Skip to content

Commit 095428d

Browse files
committed
add security, calendar and menu-builder docs
1 parent 4a5526c commit 095428d

File tree

8 files changed

+180
-5
lines changed

8 files changed

+180
-5
lines changed

src/app/navigation.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,21 @@
1818
"type": "route",
1919
"path": "forum",
2020
"label": "Forums"
21+
},
22+
{
23+
"type": "route",
24+
"path": "calendar",
25+
"label": "Calendar"
26+
},
27+
{
28+
"type": "route",
29+
"path": "menu-builder",
30+
"label": "Menu Builder"
31+
},
32+
{
33+
"type": "route",
34+
"path": "security",
35+
"label": "Security"
2136
}
2237
]
2338
},

src/app/user-manual/admin-panel/page.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ On the settings page you can find all of the components that are less frequently
6868

6969
Here you can find:
7070
- Badges,
71-
- Calendars,
71+
- <Link href="/user-manual/calendar">Calendars</Link>,
7272
- Menu Builder,
7373
- Plugins,
7474
- Reactions,
Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,28 @@
1-
# Calendar
1+
import Link from 'next/link';
2+
import { Wrench, Calendar, Plus } from '@phosphor-icons/react/dist/ssr';
3+
4+
# Calendar
5+
6+
The calendar component brings basic event scheduling capabilities to your forumify.
7+
8+
## Managing calendars
9+
10+
To get started with this component, you first need to create one or more calendars in the <Link href="/user-manual/admin-panel">Admin Panel</Link>.
11+
You can find them under <Wrench /> Settings -> <Calendar /> Calendar.
12+
13+
Calendars can be compared to buckets for events. Each calendar has its name, color, and permissions.
14+
15+
## Managing events
16+
17+
Events are managed entirely from the frontend.
18+
19+
### Creating events
20+
21+
When you have the "Manage Events" permission on at least 1 calendar,
22+
the <span className="btn-link"><Plus /> Create Event</span> button will appear.
23+
24+
### Managing events
25+
26+
Find the event you'd like to modify in the calendar and open it.
27+
If you have the "Manage Events" permission you will be able to see the edit and delete icons in the top right of the event popup.
28+

src/app/user-manual/cms/page.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Content Management System
2+
3+
The Content Management System, or CMS, is a powerful tool that allows you to add custom static and dynamic pages to your website.
4+
5+
forumify isn't just a forum platform, it's an entire suite of tools that enable you to build your community hub.
6+

src/app/user-manual/forum/page.mdx

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import Link from 'next/link';
2-
import { Plus } from '@phosphor-icons/react/dist/ssr';
2+
import { Plus, Chats } from '@phosphor-icons/react/dist/ssr';
33
import Alert from '@/components/Alert';
44

55
# Forums
@@ -9,7 +9,7 @@ keep an organized documentation library, give and/or receive help,...
99

1010
## Managing the forum
1111

12-
You can create and manage forums from the <Link href="/user-manual/admin-panel">Admin Panel</Link>, under Forums.
12+
You can create and manage forums from the <Link href="/user-manual/admin-panel">Admin Panel</Link>, under <Chats /> Forums.
1313

1414
### Groups
1515

@@ -144,3 +144,26 @@ Let's look at some examples to see what is possible with the right forum type an
144144
*\*Ideally your Helpdesk Agent role should be a moderator role. This will allow them to mark comments as answers, and manage the forum.*
145145

146146
*\*\*The "Show all topics" permission is not visible until you saved the forum with the display setting "only show own topics" enabled.*
147+
148+
## Moderating forums
149+
150+
Users who have been given moderator permissions get the ability to moderate forums.
151+
152+
This allows them to:
153+
- Edit topic titles and images
154+
- Edit all topic comments
155+
- Pin topics at the top of the list
156+
- Hide topics from non-moderators
157+
- View hidden topics
158+
- Lock topics from receiving comments
159+
- Comment on locked topics
160+
- Move topics to a different forum*
161+
- Delete topics
162+
163+
*\*Moderators can move topics to any forum they can see, but they do not need to be a moderator in the receiving forum.*
164+
165+
<Alert severity="warning">
166+
Currently to give moderator permissions you need to enable the "Moderator" checkbox on a role and assign that role.
167+
In the near future, this will change, and moderator will become an ACL permission on forums instead.
168+
</Alert>
169+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import Link from 'next/link';
2+
import Alert from '@components/Alert';
3+
import { Wrench, List, Plus } from '@phosphor-icons/react/dist/ssr';
4+
5+
# Menu Builder
6+
7+
The menu builder allows admins to configure the main frontend navigation for their users.
8+
9+
## Managing the menu
10+
11+
The menu builder can be access from the <Link href="/user-manual/admin-panel">Admin Panel</Link>. Under <Wrench /> Settings -> <List /> Menu Builder.
12+
13+
Use the <span className="btn-link"><Plus /> Add Item</span> button to create a new item in your website's menu.
14+
Enter a label and select a type, then press "Save".
15+
16+
### Menu item types
17+
18+
forumify as well as plugins provide different types of entries for the menu.
19+
20+
- **Collection**: Collections are just groups of menu items. You can nest collections as deep as you want.
21+
- **Url**: The URL type is the most basic menu item type. Ideally this should only be used for external URLs, to link to other websites.
22+
- **Route**: Routes are what forumify uses internally to link to different pages. Routes should be used for any internal links.
23+
When forumify updates, it's possible that the link that is generated behind a route changes, using routes would make sure your item continues to work as expected.
24+
- **Page**: Provides an easier way to link to a CMS Page.
25+
- **Forum**: Provides an easier way to link to a Forum.
26+
- **Calendar**: Provides an easier way to link to a Calendar.
27+
28+
<Alert severity="info">
29+
Menu item types are dynamic and new ones can be added by plugins for you to use. The above list are the ones provided by forumify.
30+
</Alert>
31+
32+
### Permissions
33+
34+
Menu items are tied into the <Link href="/user-manual/security">ACL permission system</Link>. Allowing you to hide/show menu items based on user roles.
Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,67 @@
1-
# Security
1+
import Link from 'next/link';
2+
import { Wrench, LockKey, LockSimple } from '@phosphor-icons/react/dist/ssr';
3+
import Alert from '@/components/Alert';
4+
5+
# Security
6+
7+
Security is one of the most important parts of any system. Almost all forumify components have security built into them.
8+
9+
forumify has 2 different ways of securing components, pages, entities,...
10+
11+
- Access Control Lists: defined by entities, controls individual fine-grained access for each "action" per role and per item.
12+
- Role Permissions: defined statically by the platform or plugins, controls access to larger sections or entire components.
13+
14+
## Roles
15+
16+
Everyone visiting your website is given a role. Even users who are not logged in will have the "Guest" role.
17+
18+
Users can have multiple roles. All permissions and ACLs from all the roles the user have are merged together to define what the user can or cannot do.
19+
20+
### Managing roles
21+
22+
You can manage roles in the <Link href="/user-manual/admin-panel">Admin Panel</Link>.
23+
You can find them under <Wrench /> Settings -> <LockKey /> Roles.
24+
25+
<Alert severity="warning">
26+
Security is a complicated topic. It's best practice to have a second account you can use to test and verify the setup of your roles before assigning any
27+
real users to them. A misconfiguration of roles could lead to accidentally leaking sensitive data, griefing, or even a total loss of control over your website.
28+
</Alert>
29+
30+
When creating a role, you can give it a title, and it is highly recommended to give them a description.
31+
32+
Optionally, you can enable the "Administrator" checkbox. Enabling this setting will grant access to the admin panel for all users with this role.
33+
This checkbox does not grant the user permissions to do anything within the admin panel, the different components are still protected by permissions.
34+
35+
On the role form, in the tab "Permissions", you can assign permissions to the role. The platform, and each plugin that defines permissions, are separated by tabs.
36+
These permissions are typically meant to (dis)allow access to entire components. For example, if you want to give access to the admin panel to a certain role,
37+
but only to manage badges, you only select "view" and "manage" under "Settings" -> "Badges".
38+
39+
Finally, to add or remove roles from a user, you have to edit the user. You can then manage their roles using the Roles input.
40+
41+
<Alert severity="info">
42+
Roles use a simple 1 dimensional hiearchy. Meaning that you can only assign roles that are equal-or-below your own role. Roles can be sorted using the
43+
arrows in front of the rows in the Roles table.
44+
</Alert>
45+
46+
47+
### System roles
48+
49+
There are 3 roles within forumify that can not be deleted or modified:
50+
51+
- **Super Admin**: The Super Admin role bypasses any and all security checks.
52+
It's the most powerful role in your system and should be treated with extreme care.
53+
Only the website's owner should have this role. It is given to the user who installed the platform.
54+
- **User**: The User role is automatically assigned to any user that is logged in.
55+
- **Guest**: The Guest role is automatically assigned to any user that is *not* logged in.
56+
57+
So if you want to grant access to **all** users, all you have to do is assign the permission to both *User* and *Guest* roles.
58+
59+
## ACL (Access Control Lists)
60+
61+
The most common security mechanism you will see in action is ACL. ACL allows you to enable an action for each role.
62+
63+
ACLs are not managed in the Role's setting, but they are managed in the entity that defines them.
64+
Usually when you see a <LockSimple /> button, you are editing the access control for that entity.
65+
Entities that are governed by ACLs define their own permissions.
66+
For example, a forum defines the permissions "view", "create topic", "create comment",...
67+

src/styles/index.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,7 @@ span {
8585
padding: var(--spacing-2);
8686
}
8787
}
88+
89+
ol, ul {
90+
margin-bottom: var(--spacing-2);
91+
}

0 commit comments

Comments
 (0)