mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
Merge pull request #89 from stevie-mayhew/feature/administration
UPDATE: explicitly provide permissions for comment administration
This commit is contained in:
commit
a061be8732
@ -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
|
||||
*/
|
||||
|
@ -17,6 +17,7 @@ en:
|
||||
Moderated: Moderated
|
||||
NeedsModeration: 'Needs Moderation'
|
||||
MENUTITLE: Comments
|
||||
ADMIN_PERMISSION: "Access to 'Comments' section"
|
||||
CommentInterface:
|
||||
POST: Post
|
||||
YOURNAME: 'Your name'
|
||||
|
Loading…
Reference in New Issue
Block a user