Merge branch 'master' of github.com:shish/shimmie2
This commit is contained in:
commit
357b298122
3 changed files with 10 additions and 7 deletions
|
@ -64,8 +64,8 @@ define("EXTRA_USER_CLASSES", serialize(array(
|
|||
"admin", # class to base it on
|
||||
array( # parts of the base class to override
|
||||
"override_config" => False,
|
||||
"change_password" => False,
|
||||
"change_user_info" => False,
|
||||
"edit_user_password" => False,
|
||||
"edit_user_info" => False,
|
||||
"delete_user" => False,
|
||||
"manage_extension_list" => False,
|
||||
)
|
||||
|
|
|
@ -29,14 +29,17 @@ class UserClass {
|
|||
}
|
||||
}
|
||||
|
||||
// action_object_attribute
|
||||
// action = create / view / edit / delete
|
||||
// object = image / user / tag / setting
|
||||
$_user_class_base = new UserClass("base", null, array(
|
||||
"change_setting" => False, # modify web-level settings, eg the config table
|
||||
"override_config" => False, # modify sys-level settings, eg config.php
|
||||
"big_search" => False, # search for more than 3 tags at once (speed mode only)
|
||||
"view_ip" => False, # view IP addresses associated with things
|
||||
"ban_ip" => False,
|
||||
"change_password" => False,
|
||||
"change_user_info" => False, # email address, etc
|
||||
"edit_user_password" => False,
|
||||
"edit_user_info" => False, # email address, etc
|
||||
"delete_user" => False,
|
||||
"delete_image" => False,
|
||||
"delete_comment" => False,
|
||||
|
@ -70,8 +73,8 @@ $_user_classes["admin"] = new UserClass("admin", $_user_class_base, array(
|
|||
"lock_image" => True,
|
||||
"view_ip" => True,
|
||||
"ban_ip" => True,
|
||||
"change_password" => True,
|
||||
"change_user_info" => True,
|
||||
"edit_user_password" => True,
|
||||
"edit_user_info" => True,
|
||||
"delete_user" => True,
|
||||
"delete_image" => True,
|
||||
"delete_comment" => True,
|
||||
|
|
|
@ -149,7 +149,7 @@ class UserPageTheme extends Themelet {
|
|||
$page->add_block(new Block("Stats", join("<br>", $stats), "main", 0));
|
||||
|
||||
if(!$user->is_anonymous()) {
|
||||
if($user->id == $duser->id || $user->can("change_user_info")) {
|
||||
if($user->id == $duser->id || $user->can("edit_user_info")) {
|
||||
$page->add_block(new Block("Options", $this->build_options($duser), "main", 20));
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue