Skip to content

Commit 09829d7

Browse files
committed
Don't use group inheritance (may be back later)
1 parent 61e9b13 commit 09829d7

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

featherbb/Controller/Install.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,18 @@ public function create_db(array $data)
207207
}
208208

209209
// Init permissions
210-
Container::get('perms')->addParent(4, array(3));
211-
Container::get('perms')->addParent(2, array(3,4));
212-
Container::get('perms')->addParent(1, array(2,3,4));
210+
// TODO: Reuse groups inheritance later ?
211+
// Container::get('perms')->addParent(4, array(3));
212+
// Container::get('perms')->addParent(2, array(3,4));
213+
// Container::get('perms')->addParent(1, array(2,3,4));
214+
// Container::get('perms')->allowGroup(3, array('board.read', 'users.view', 'search.topics', 'search.users'));
215+
// Container::get('perms')->allowGroup(4, array('topic.reply', 'topic.post', 'topic.delete', 'post.delete', 'post.edit', 'post.links', 'email.send'));
216+
// Container::get('perms')->allowGroup(2, array('mod.is_mod', 'mod.edit_users', 'mod.rename_users', 'mod.change_passwords', 'mod.promote_users', 'mod.ban_users', 'user.set_title'));
213217

214218
Container::get('perms')->allowGroup(3, array('board.read', 'users.view', 'search.topics', 'search.users'));
215-
Container::get('perms')->allowGroup(4, array('topic.reply', 'topic.post', 'topic.delete', 'post.delete', 'post.edit', 'post.links', 'email.send'));
216-
Container::get('perms')->allowGroup(2, array('modpanel.*', 'mod.is_mod', 'mod.edit_users', 'mod.rename_users', 'mod.change_passwords', 'mod.promote_users', 'mod.ban_users', 'user.set_title'));
217-
Container::get('perms')->allowGroup(1, array('board.*'));
219+
Container::get('perms')->allowGroup(4, array('board.read', 'users.view', 'search.topics', 'search.users', 'topic.reply', 'topic.post', 'topic.delete', 'post.delete', 'post.edit', 'post.links', 'email.send'));
220+
Container::get('perms')->allowGroup(2, array('board.read', 'users.view', 'user.set_title', 'search.topics', 'search.users', 'topic.reply', 'topic.post', 'topic.delete', 'post.delete', 'post.edit', 'post.links', 'email.send', 'mod.is_mod', 'mod.edit_users', 'mod.rename_users', 'mod.change_passwords', 'mod.promote_users', 'mod.ban_users'));
221+
Container::get('perms')->allowGroup(1, array('*'));
218222
// Init preferences
219223
Container::get('prefs')->set(array(
220224
'post.min_interval' => 60,

featherbb/Model/Install.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ class Install
8080
`g_promote_min_posts` int(10) unsigned NOT NULL DEFAULT '0',
8181
`g_promote_next_group` int(10) unsigned NOT NULL DEFAULT '0',
8282
`g_moderator` tinyint(1) NOT NULL DEFAULT '0',
83-
`g_read_board` tinyint(1) NOT NULL DEFAULT '1',
8483
`g_post_replies` tinyint(1) NOT NULL DEFAULT '1',
8584
`g_post_topics` tinyint(1) NOT NULL DEFAULT '1',
8685
`inherit` text,
@@ -283,7 +282,6 @@ public static function load_default_groups()
283282
'g_title' => __('Administrators'),
284283
'g_user_title' => __('Administrator'),
285284
'g_moderator' => 1,
286-
'g_read_board' => 1,
287285
'g_post_replies' => 1,
288286
'g_post_topics' => 1
289287
);
@@ -292,7 +290,6 @@ public static function load_default_groups()
292290
'g_title' => __('Moderators'),
293291
'g_user_title' => __('Moderator'),
294292
'g_moderator' => 1,
295-
'g_read_board' => 1,
296293
'g_post_replies' => 1,
297294
'g_post_topics' => 1
298295
);
@@ -301,7 +298,6 @@ public static function load_default_groups()
301298
'g_title' => __('Guests'),
302299
'g_user_title' => __('Guest'),
303300
'g_moderator' => 0,
304-
'g_read_board' => 1,
305301
'g_post_replies' => 0,
306302
'g_post_topics' => 0
307303
);
@@ -310,7 +306,6 @@ public static function load_default_groups()
310306
'g_title' => __('Members'),
311307
'g_user_title' => __('Member'),
312308
'g_moderator' => 0,
313-
'g_read_board' => 1,
314309
'g_post_replies' => 1,
315310
'g_post_topics' => 1
316311
);

0 commit comments

Comments
 (0)