UPDATE: explicitly provide permissions for comment administration

This commit is contained in:
Stevie Mayhew 2014-11-12 10:35:35 +13:00
parent aaec312fd5
commit bba7a84bd1
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'