Users, groups and rights
Users belong to groups, and groups get rights on pages. A visitor who is not signed in is in the guests' group.
Rights
| Level | Caption | What it allows |
|---|---|---|
| 0 | «Права отсутствуют» (No rights) | the page does not exist for the user: 404 |
| 1 | «Только чтение» (Read only) | see the page |
| 2 | «Редактирование» (Edit) | what the page's components allow at this level, such as editing one's profile |
| 3 | «Полный доступ» (Full access) | edit mode, the admin toolbar and the admin pages |
A user's right on a page is the highest right of their groups. A component on a page runs only when that right is enough for it.
The installer creates three groups: «Администратор» (Administrator) — full access everywhere; «Гость» (Guest) — the guests' group, read only on the public pages; «Пользователь» (User) — the group of new registrations, the same pages plus their profile. Guests and signed-in users without a group get the guests' group; a user's own groups replace it.
A new page starts with its parent's rights; the tab «Права на страницу» (Page rights) of the page form sets a level for each group.
The admin pages
- «Пользователи» (Users) —
/admin/users/: add, edit and delete users, and «Активизировать» (Activate), which switches a user on or off. The tab «Группы» (Groups) puts a user into groups. An empty password leaves it as it was. You can't delete or switch off yourself. A user added here gets no letter. - «Роли» (Roles) —
/admin/users/roles/: groups, the guests' and the new users' default group, and the tab «Права на разделы» (Section rights) — the whole page tree with a level for each page; the column «Все разделы» (All sections) sets one level everywhere. The guests' group can't be deleted.
Registration, sign-in and passwords
- Registration —
/register/: e-mail (it is the login, at most 50 characters), «Полное имя» (Full name) and a few optional fields. A trap field and a minimum of 3 seconds turn bots away. The new user is active at once, joins «Пользователь» and gets the letteruser_registrationwith a link to set a password; the link works for an hour. - Sign-in —
/login/and the sign-in link in the header. After 5 failed attempts for one login from one IP address that login is locked for that address; after 20 failures from one address the whole address is locked; both for 15 minutes. A switched-off user can't sign in. OnlyREMOTE_ADDRcounts: behind a reverse proxy all visitors share one address. - A new password — «Забыли пароль?» (Forgot password?) leads to
/restore-password/. The answer is the same for any address; one letter per address per 5 minutes; the link works for an hour. Setting the password ends all of the user's sessions. - The profile —
/profile/: a new password, or a new login e-mail, needs the current password.
Sessions
A session lives session.lifespan seconds — 108000, or 30 hours, by default — counted from the last request. Sessions are kept in a MEMORY table of the database, so a restart of MariaDB signs everyone out.