AdminRequirements
From StatusNet
This is a page to capture the requirements for an administrative interface slated to be created for 0.9.x release.
- I implemented the admin and role system in StatusNet, and didn't follow these requirements slavishly. --Evan 16:44, 23 January 2010 (UTC)
Contents |
[edit] Specifications
[edit] Roles
- admin
- moderator
[edit] Abilities:
[edit] admin
- Configure site
- Plugins -> Plugin installation interface
- Themes
- Add/remove users from roles
- + all of 'moderator'
[edit] moderator
- Ban Users
- Delete inappropriate messages
- Make group admins
[edit] New table
(userid, rolename, created) e.g. (23, 'admin', '2009-08-07 10:10:10')
create table user_role ( user_id integer not null comment 'user who has role' references user (id), role_name varchar(10) not null comment 'name of role', created datetime not null comment 'date this record was created' ) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
[edit] Function like
create table user_role (
user_id integer not null comment 'user who has role' references user (id),
role_name varchar(10) not null comment 'name of role',
created datetime not null comment 'date this record was created'
) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
$cur = common_current_user();
if ( $cur->hasRole('moderator') ) {
$this->showBanButton();
}
[edit] Pluggable
Allow role information to be pulled from LDAP or other sources.
[edit] Other Ideas
create table user_role (
user_id integer not null comment 'user who has role' references user (id),
role_name varchar(10) not null comment 'name of role',
created datetime not null comment 'date this record was created'
) ENGINE=MyISAM CHARACTER SET utf8 COLLATE utf8_general_ci;
$cur = common_current_user();
if ( $cur->hasRole('moderator') ) {
$this->showBanButton();
}
$config['site']['superadmin'] = 1;
(an admin who cannot be deleted, incase of rogue admin?)