|
From: Eloi G. <ada...@us...> - 2008-10-11 06:13:57
|
Update of /cvsroot/phpwebsite-comm/modules/article In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv704 Modified Files: index_admin.php Log Message: RFE [2091396] - Approval Permissions are now given on a per-Admin basis Index: index_admin.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/article/index_admin.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** index_admin.php 10 Oct 2008 05:04:23 -0000 1.21 --- index_admin.php 11 Oct 2008 06:13:52 -0000 1.22 *************** *** 52,56 **** $vars['version_id'] = $version_id; ! if (!$version->vr_approved && Current_User::isUnrestricted('article')) { $vars['op'] = 'approve_item'; $options[] = PHPWS_Text::secureLink(dgettext('article', 'Approve'), 'article', $vars); --- 52,56 ---- $vars['version_id'] = $version_id; ! if (!$version->vr_approved && Current_User::allow('article', 'approval')) { $vars['op'] = 'approve_item'; $options[] = PHPWS_Text::secureLink(dgettext('article', 'Approve'), 'article', $vars); *************** *** 70,74 **** $title = sprintf(dgettext('article', 'This the current version (%s) of this article.'), $version->vr_number); } ! elseif (Current_User::isUnrestricted('article')) { // This is the url to our module that will restore the version $vars['op'] = 'restore_version'; --- 70,74 ---- $title = sprintf(dgettext('article', 'This the current version (%s) of this article.'), $version->vr_number); } ! elseif (Current_User::allow('article', 'approval')) { // This is the url to our module that will restore the version $vars['op'] = 'restore_version'; *************** *** 264,268 **** return; /* Make sure that user can approve the article */ ! if(!$GLOBALS['Article']['val']['need_approval'] || Current_User::isUnrestricted('article')) { /* This removes the [Draft] flag & approves the article. */ $article->approved = 1; --- 264,268 ---- return; /* Make sure that user can approve the article */ ! if(!$GLOBALS['Article']['val']['need_approval'] || Current_User::allow('article', 'approval')) { /* This removes the [Draft] flag & approves the article. */ $article->approved = 1; *************** *** 387,391 **** case 'xml_export': ! if (Current_User::isUnrestricted('article')) { PHPWS_Core::initModClass('article', 'AM_Actions.php'); /* This operation can be performed in bulk */ --- 387,391 ---- case 'xml_export': ! if (Current_User::allow('article', 'delete_articles')) { PHPWS_Core::initModClass('article', 'AM_Actions.php'); /* This operation can be performed in bulk */ *************** *** 420,424 **** case 'approve_item': ! if (!Current_User::isUnrestricted('article')) { Current_User::disallow('Attempted to approve an item.'); return; --- 420,424 ---- case 'approve_item': ! if (!Current_User::allow('article', 'approval')) { Current_User::disallow('Attempted to approve an item.'); return; *************** *** 439,443 **** case 'disapprove_item': ! if (!Current_User::isUnrestricted('article')) { Current_User::disallow('Attempted to disapprove an item.'); return; --- 439,443 ---- case 'disapprove_item': ! if (!Current_User::allow('article', 'approval')) { Current_User::disallow('Attempted to disapprove an item.'); return; *************** *** 458,462 **** case 'disapprove_item_cofirmed': ! if (!Current_User::isUnrestricted('article')) { Current_User::disallow('Attempted to disapprove an item.'); } --- 458,462 ---- case 'disapprove_item_cofirmed': ! if (!Current_User::allow('article', 'approval')) { Current_User::disallow('Attempted to disapprove an item.'); } *************** *** 519,523 **** case 'restore_version': ! if (!Current_User::isUnrestricted('article')) { Current_User::disallow('Attempted to restore a version'); return; --- 519,523 ---- case 'restore_version': ! if (!Current_User::allow('article', 'approval')) { Current_User::disallow('Attempted to restore a version'); return; *************** *** 537,541 **** case 'remove_version': ! if (!Current_User::isUnrestricted('article')) { Current_User::disallow('Attempted to delete a version'); return; --- 537,541 ---- case 'remove_version': ! if (!Current_User::allow('article', 'approval')) { Current_User::disallow('Attempted to delete a version'); return; |