Commit Graph

6 Enmetoj

Author SHA1 Message Date
Jaidyn Ann 9f05ce1136 Misc. tweaks, no functional change 2021-08-01 06:37:25 -05:00
Jaidyn Ann 82c06bba25 Localization, init catkeys 2021-07-19 09:54:27 -05:00
Jaidyn Ann f5b90ecc5e Include BString in Role.h 2021-06-30 18:05:22 -05:00
Jaidyn Ann fb070e841a Store default commands/menu items in resources 2021-06-30 14:27:58 -05:00
Jaidyn Ann fe99f3d83a Show moderation items in right-click user menu, by perm 2021-06-06 01:49:11 -05:00
Jaidyn Ann 6e1ca87890 Support for "Roles" (user, moderator, admin, etc.)
Add scaffodling support for arbitrary roles and permission-based (and
varying!) UI.

A new class, Role, represents a user's role in a given room, with three
values:
	* The role's title
	* The role's permission-set
	* The role's priority

The permission set is a bitmask value for various permissions (e.g.,
PERM_WRITE, PERM_BAN, etc), and priority is position in the hierarchy.
A user with higher priority (and PERM_BAN) can ban a user with lower
priority, but not vice-versa. Two users with the same priority can't
ban/kick/mute each other, etc.

These permissions should be used to determine what UI elements are
displayed― if the user doesn't have permission to ban users, then a
"Ban" button shouldn't exist. If the user is muted, they shouldn't be
able to type. So on and so forth.

For now, permissions are sent with a IM_ROLECHANGE message and stored
by the Conversation, but aren't really in use yet.

This system should be flexible groundwork to account for the varying
administrative hierarchies and norms of different protocols.
2021-06-06 00:59:07 -05:00