diff --git a/code/CommentAdmin.php b/code/CommentAdmin.php index a47d31a..32dcec2 100644 --- a/code/CommentAdmin.php +++ b/code/CommentAdmin.php @@ -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 */ diff --git a/lang/en.yml b/lang/en.yml index 164e4fe..2cdf0cd 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -17,6 +17,7 @@ en: Moderated: Moderated NeedsModeration: 'Needs Moderation' MENUTITLE: Comments + ADMIN_PERMISSION: "Access to 'Comments' section" CommentInterface: POST: Post YOURNAME: 'Your name'