AdminRequirements

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)

Roles

 * admin
 * moderator

admin

 * Configure site
 * Plugins -> Plugin installation interface
 * Themes
 * Add/remove users from roles
 * + all of 'moderator'

moderator

 * Ban Users
 * Delete inappropriate messages
 * Make group admins

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;

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-&amp;gt;hasRole('moderator') ) { $this-&amp;gt;showBanButton; }

Pluggable
Allow role information to be pulled from LDAP or other sources.

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-&amp;gt;hasRole('moderator') ) { $this-&amp;gt;showBanButton; } $config['site']['superadmin'] = 1;

(an admin who cannot be deleted, incase of rogue admin?)