@@ -66,6 +66,7 @@ class RoleModel extends Gdn_Model {
6666 'Groups.Category.Manage ' => 1 ,
6767 'Groups.Group.Delete ' => 1 ,
6868 'Groups.Group.Edit ' => 1 ,
69+ 'Groups.Group.Archive ' => 1 ,
6970 'Garden.Uploads.Add ' => 1 ,
7071 'Vanilla.Tagging.Add ' => 1 ,
7172 'Conversations.Moderation.Manage ' => 1 ,
@@ -83,17 +84,82 @@ class RoleModel extends Gdn_Model {
8384 'Vanilla.Comments.Edit ' => 1 ,
8485 'Vanilla.Comments.Delete ' => 1 ,
8586 'Plugins.Attachments.Upload.Allow ' => 1 ,
86- 'Groups.Group.Archive ' => 1
87+ ];
88+
89+ const GUEST_PERMISSIONS = [
90+ 'Garden.Email.View ' => 0 ,
91+ 'Garden.Settings.Manage ' => 0 ,
92+ 'Garden.Settings.View ' => 0 ,
93+ 'Garden.SignIn.Allow ' => 0 ,
94+ 'Garden.Users.Add ' => 0 ,
95+ 'Garden.Users.Edit ' => 0 ,
96+ 'Garden.Users.Delete ' => 0 ,
97+ 'Garden.Users.Approve ' => 0 ,
98+ 'Garden.Activity.Delete ' => 0 ,
99+ 'Garden.Activity.View ' => 0 ,
100+ 'Garden.Profiles.View ' => 0 ,
101+ 'Garden.Profiles.Edit ' => 0 ,
102+ 'Garden.Curation.Manage ' => 0 ,
103+ 'Garden.Moderation.Manage ' => 0 ,
104+ 'Garden.PersonalInfo.View ' => 0 ,
105+ 'Garden.AdvancedNotifications.Allow ' => 0 ,
106+ 'Garden.Community.Manage ' => 0 ,
107+ 'Garden.Tokens.Add ' => 0 ,
108+ 'Groups.Group.Add ' => 0 ,
109+ 'Groups.Moderation.Manage ' => 0 ,
110+ 'Groups.EmailInvitations.Add ' => 0 ,
111+ 'Groups.Category.Manage ' => 0 ,
112+ 'Groups.Group.Delete ' => 0 ,
113+ 'Groups.Group.Edit ' => 0 ,
114+ 'Groups.Group.Archive ' => 0 ,
115+ 'Garden.Uploads.Add ' => 0 ,
116+ 'Vanilla.Tagging.Add ' => 0 ,
117+ 'Conversations.Moderation.Manage ' => 0 ,
118+ 'Conversations.Conversations.Add ' => 0 ,
119+ 'Vanilla.Approval.Require ' => 1 , //
120+ 'Vanilla.Comments.Me ' => 0 ,
121+ 'Vanilla.Discussions.View ' => 0 ,
122+ 'Vanilla.Discussions.Add ' => 0 ,
123+ 'Vanilla.Discussions.Edit ' => 0 ,
124+ 'Vanilla.Discussions.Announce ' => 0 ,
125+ 'Vanilla.Discussions.Sink ' => 0 ,
126+ 'Vanilla.Discussions.Close ' => 0 ,
127+ 'Vanilla.Discussions.Delete ' => 0 ,
128+ 'Vanilla.Comments.Add ' => 0 ,
129+ 'Vanilla.Comments.Edit ' => 0 ,
130+ 'Vanilla.Comments.Delete ' => 0 ,
131+ 'Plugins.Attachments.Upload.Allow ' => 0
132+ ];
87133
134+ const VANILLA_GUEST_ROLES = [
135+ 'Guest ' => self ::GUEST_PERMISSIONS //The default Vanilla role for Guests
88136 ];
137+
89138 const TOPCODER_ROLES = [
90139 'administrator ' => self ::ALL_VANILLA_PERMISSIONS ,
91- 'Connect Manager ' => [],
140+ 'Connect Manager ' => [
141+ 'Groups.Category.Manage ' => 1 ,
142+ ],
92143 'Connect Account Manager ' => [],
93144 'Connect Copilot ' => [
94145 'Groups.Category.Manage ' => 1 ,
95146 'Groups.Moderation.Manage ' => 1 ,
96- 'Groups.EmailInvitations.Add ' => 1
147+ 'Groups.EmailInvitations.Add ' => 1 ,
148+ 'Groups.Category.Manage ' => 1 ,
149+ 'Groups.Moderation.Manage ' => 1 ,
150+ 'Groups.EmailInvitations.Add ' => 1 ,
151+ 'Garden.Uploads.Add ' => 1 ,
152+ 'Plugins.Attachments.Upload.Allow ' => 1 ,
153+ 'Vanilla.Discussions.View ' => 1 ,
154+ 'Vanilla.Discussions.Add ' => 1 ,
155+ 'Vanilla.Discussions.Edit ' => 1 ,
156+ 'Vanilla.Discussions.Announce ' => 1 ,
157+ 'Vanilla.Discussions.Sink ' => 1 ,
158+ 'Vanilla.Discussions.Close ' => 0 ,
159+ 'Vanilla.Discussions.Delete ' => 1 ,
160+ 'Vanilla.Comments.Add ' => 1 ,
161+ 'Vanilla.Comments.Edit ' => 0 ,
162+ 'Vanilla.Comments.Delete ' => 1 ,
97163 ],
98164 'Connect Admin ' => self ::ALL_VANILLA_PERMISSIONS ,
99165 'Connect Copilot Manager ' => [
@@ -119,7 +185,16 @@ class RoleModel extends Gdn_Model {
119185 'copilot ' => [
120186 'Groups.Category.Manage ' => 1 ,
121187 'Groups.Moderation.Manage ' => 1 ,
122- 'Groups.EmailInvitations.Add ' => 1
188+ 'Groups.EmailInvitations.Add ' => 1 ,
189+ 'Garden.Uploads.Add ' => 1 ,
190+ 'Plugins.Attachments.Upload.Allow ' => 1 ,
191+ 'Vanilla.Discussions.View ' => 1 ,
192+ 'Vanilla.Discussions.Add ' => 1 ,
193+ 'Vanilla.Discussions.Edit ' => 1 ,
194+ 'Vanilla.Discussions.Announce ' => 1 ,
195+ 'Vanilla.Discussions.Sink ' => 0 ,
196+ 'Vanilla.Discussions.Close ' => 1 ,
197+ 'Vanilla.Discussions.Delete ' => 1 ,
123198 ],
124199 'customer ' => [],
125200 'observer ' => [],
0 commit comments