Merge pull request #89 from stevie-mayhew/feature/administration

UPDATE: explicitly provide permissions for comment administration
This commit is contained in:
Will Rossiter 2014-11-12 12:13:33 +13:00
commit a061be8732
2 changed files with 11 additions and 1 deletions

View File

@ -5,7 +5,7 @@
*
* @package comments
*/
class CommentAdmin extends LeftAndMain {
class CommentAdmin extends LeftAndMain implements PermissionProvider {
private static $url_segment = 'comments';
@ -24,6 +24,15 @@ class CommentAdmin extends LeftAndMain {
'unmoderated'
);
public function providePermissions() {
return array(
"CMS_ACCESS_CommentAdmin" => array(
'name' => _t('CommentAdmin.ADMIN_PERMISSION', "Access to 'Comments' section"),
'category' => _t('Permission.CMS_ACCESS_CATEGORY', 'CMS Access')
)
);
}
/**
* @return Form
*/

View File

@ -17,6 +17,7 @@ en:
Moderated: Moderated
NeedsModeration: 'Needs Moderation'
MENUTITLE: Comments
ADMIN_PERMISSION: "Access to 'Comments' section"
CommentInterface:
POST: Post
YOURNAME: 'Your name'