Changeset 3004
- Timestamp:
- 08/29/08 18:59:22 (3 months ago)
- Files:
-
- trunk/lib/MT/Role.pm (modified) (2 diffs)
- trunk/lib/MT/Upgrade/Core.pm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/MT/Role.pm
r2949 r3004 127 127 128 128 my @default_roles = ( 129 { name => 'Blog Administrator',130 description => 'Can administer the blog.',129 { name => MT->translate('Blog Administrator'), 130 description => MT->translate('Can administer the blog.'), 131 131 role_mask => 2**12, 132 132 perms => ['administer_blog'] }, 133 { name => 'Editor',134 description => 'Can upload files, edit all entries/categories/tags on a blog and publish the blog.',133 { name => MT->translate('Editor'), 134 description => MT->translate('Can upload files, edit all entries/categories/tags on a blog and publish the blog.'), 135 135 perms => ['comment', 'create_post', 'publish_post', 'edit_all_posts', 'edit_categories', 'edit_tags', 'manage_pages', 136 136 'rebuild', 'upload', 'send_notifications', 'manage_feedback', 'edit_assets'], }, 137 { name => 'Author',138 description => 'Can create entries, edit their own, upload files and publish.',137 { name => MT->translate('Author'), 138 description => MT->translate('Can create entries, edit their own, upload files and publish.'), 139 139 perms => ['comment', 'create_post', 'publish_post', 'upload', 'send_notifications'], }, 140 { name => 'Designer',141 description => 'Can edit, manage and publish blog templates.',140 { name => MT->translate('Designer'), 141 description => MT->translate('Can edit, manage and publish blog templates.'), 142 142 role_mask => (2**4 + 2**7), 143 143 perms => ['edit_templates', 'rebuild'] }, 144 { name => 'Webmaster',145 description => 'Can manage pages and publish blog templates.',144 { name => MT->translate('Webmaster'), 145 description => MT->translate('Can manage pages and publish blog templates.'), 146 146 perms => ['manage_pages', 'rebuild'] }, 147 { name => 'Contributor',148 description => 'Can create entries, edit their own and comment.',147 { name => MT->translate('Contributor'), 148 description => MT->translate('Can create entries, edit their own and comment.'), 149 149 perms => ['comment', 'create_post'], }, 150 { name => 'Moderator',151 description => 'Can comment and manage feedback.',150 { name => MT->translate('Moderator'), 151 description => MT->translate('Can comment and manage feedback.'), 152 152 perms => ['comment', 'manage_feedback'], }, 153 { name => 'Commenter',154 description => 'Can comment.',153 { name => MT->translate('Commenter'), 154 description => MT->translate('Can comment.'), 155 155 role_mask => 2**0, 156 156 perms => ['comment'], }, … … 162 162 foreach my $r (@default_roles) { 163 163 my $role = MT::Role->new(); 164 $role->name( MT->translate($r->{name}));165 $role->description( MT->translate($r->{description}));164 $role->name($r->{name}); 165 $role->description($r->{description}); 166 166 $role->clear_full_permissions; 167 167 $role->set_these_permissions($r->{perms}); trunk/lib/MT/Upgrade/Core.pm
r2949 r3004 95 95 }, 96 96 'core_install_default_roles' => { 97 code => \&create_default_roles,97 code => sub { require MT::Role; return MT::Role->create_default_roles }, 98 98 on_class => 'MT::Role', 99 99 priority => 3.1, … … 103 103 104 104 ### Subroutines 105 106 ## Translation107 # translate('Blog Administrator')108 # translate('Can administer the blog.')109 # translate('Editor')110 # translate('Can upload files, edit all entries/categories/tags on a blog and publish the blog.')111 # translate('Author')112 # translate('Can create entries, edit their own, upload files and publish.')113 # translate('Designer')114 # translate('Can edit, manage and publish blog templates.')115 # translate('Webmaster')116 # translate('Can manage pages and publish blog templates.')117 # translate('Contributor')118 # translate('Can create entries, edit their own and comment.')119 # translate('Moderator')120 # translate('Can comment and manage feedback.')121 # translate('Commenter')122 # translate('Can comment.')123 105 124 106 sub seed_database {
