Committer: iaskarov
LJSUP-8304 New privilege "unsuspend"U trunk/bin/upgrading/base-data.sql U trunk/cgi-bin/LJ/Console/Command/Unsuspend.pm
Modified: trunk/bin/upgrading/base-data.sql =================================================================== --- trunk/bin/upgrading/base-data.sql 2011-03-22 09:22:14 UTC (rev 18666) +++ trunk/bin/upgrading/base-data.sql 2011-03-22 09:25:11 UTC (rev 18667) @@ -576,6 +576,8 @@ UPDATE priv_list SET des='Allows a user to make use of the stock answers in a support category. arg=Unique support category',is_public='1',privname='View stock answers',scope='general' WHERE privcode='supportviewstocks'; INSERT IGNORE INTO priv_list (des, is_public, privcode, privname, scope) VALUES ('Allows a user to suspend or unsuspend user accounts. Used by the Abuse Team.', '0', 'suspend', 'Suspend accounts', 'general'); UPDATE priv_list SET des='Allows a user to suspend or unsuspend user accounts. Used by the Abuse Team.',is_public='0',privname='Suspend accounts',scope='general' WHERE privcode='suspend'; +INSERT IGNORE INTO priv_list (des, is_public, privcode, privname, scope) VALUES ('Allows a user to unsuspend user accounts. Used by the Support Team.', '0', 'unsuspend', 'Unsuspend accounts', 'general'); +UPDATE priv_list SET des='Allows a user to unsuspend user accounts. Used by the Support Team.',is_public='0',privname='Unsuspend accounts',scope='general' WHERE privcode='unsuspend'; INSERT IGNORE INTO priv_list (des, is_public, privcode, privname, scope) VALUES ('Allows editing settings of syndicated journal that shouldn\'t be editable by users.', '0', 'syn_edit', 'Edit Syndicated Settings', 'general'); UPDATE priv_list SET des='Allows editing settings of syndicated journal that shouldn\'t be editable by users.',is_public='0',privname='Edit Syndicated Settings',scope='general' WHERE privcode='syn_edit'; INSERT IGNORE INTO priv_list (des, is_public, privcode, privname, scope) VALUES ('Allows a user to modify bans with the sysban mechanism. arg=A specific ban type the user can modify, or \"*\" for all ban type.', '0', 'sysban', 'Modify System Bans', 'general'); Modified: trunk/cgi-bin/LJ/Console/Command/Unsuspend.pm =================================================================== --- trunk/cgi-bin/LJ/Console/Command/Unsuspend.pm 2011-03-22 09:22:14 UTC (rev 18666) +++ trunk/cgi-bin/LJ/Console/Command/Unsuspend.pm 2011-03-22 09:25:11 UTC (rev 18667) @@ -18,7 +18,8 @@ sub can_execute { my $remote = LJ::get_remote(); - return LJ::check_priv($remote, "suspend"); + return LJ::check_priv($remote, "suspend") + || LJ::check_priv($remote, "unsuspend"); } sub execute {