1// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
2// See LICENSE.txt for license information.
3
4package model
5
6const (
7	PermissionScopeSystem  = "system_scope"
8	PermissionScopeTeam    = "team_scope"
9	PermissionScopeChannel = "channel_scope"
10)
11
12type Permission struct {
13	Id          string `json:"id"`
14	Name        string `json:"name"`
15	Description string `json:"description"`
16	Scope       string `json:"scope"`
17}
18
19var PermissionInviteUser *Permission
20var PermissionAddUserToTeam *Permission
21var PermissionUseSlashCommands *Permission
22var PermissionManageSlashCommands *Permission
23var PermissionManageOthersSlashCommands *Permission
24var PermissionCreatePublicChannel *Permission
25var PermissionCreatePrivateChannel *Permission
26var PermissionManagePublicChannelMembers *Permission
27var PermissionManagePrivateChannelMembers *Permission
28var PermissionConvertPublicChannelToPrivate *Permission
29var PermissionConvertPrivateChannelToPublic *Permission
30var PermissionAssignSystemAdminRole *Permission
31var PermissionManageRoles *Permission
32var PermissionManageTeamRoles *Permission
33var PermissionManageChannelRoles *Permission
34var PermissionCreateDirectChannel *Permission
35var PermissionCreateGroupChannel *Permission
36var PermissionManagePublicChannelProperties *Permission
37var PermissionManagePrivateChannelProperties *Permission
38var PermissionListPublicTeams *Permission
39var PermissionJoinPublicTeams *Permission
40var PermissionListPrivateTeams *Permission
41var PermissionJoinPrivateTeams *Permission
42var PermissionListTeamChannels *Permission
43var PermissionJoinPublicChannels *Permission
44var PermissionDeletePublicChannel *Permission
45var PermissionDeletePrivateChannel *Permission
46var PermissionEditOtherUsers *Permission
47var PermissionReadChannel *Permission
48var PermissionReadPublicChannelGroups *Permission
49var PermissionReadPrivateChannelGroups *Permission
50var PermissionReadPublicChannel *Permission
51var PermissionAddReaction *Permission
52var PermissionRemoveReaction *Permission
53var PermissionRemoveOthersReactions *Permission
54var PermissionPermanentDeleteUser *Permission
55var PermissionUploadFile *Permission
56var PermissionGetPublicLink *Permission
57var PermissionManageWebhooks *Permission
58var PermissionManageOthersWebhooks *Permission
59var PermissionManageIncomingWebhooks *Permission
60var PermissionManageOutgoingWebhooks *Permission
61var PermissionManageOthersIncomingWebhooks *Permission
62var PermissionManageOthersOutgoingWebhooks *Permission
63var PermissionManageOAuth *Permission
64var PermissionManageSystemWideOAuth *Permission
65var PermissionManageEmojis *Permission
66var PermissionManageOthersEmojis *Permission
67var PermissionCreateEmojis *Permission
68var PermissionDeleteEmojis *Permission
69var PermissionDeleteOthersEmojis *Permission
70var PermissionCreatePost *Permission
71var PermissionCreatePostPublic *Permission
72var PermissionCreatePostEphemeral *Permission
73var PermissionEditPost *Permission
74var PermissionEditOthersPosts *Permission
75var PermissionDeletePost *Permission
76var PermissionDeleteOthersPosts *Permission
77var PermissionRemoveUserFromTeam *Permission
78var PermissionCreateTeam *Permission
79var PermissionManageTeam *Permission
80var PermissionImportTeam *Permission
81var PermissionViewTeam *Permission
82var PermissionListUsersWithoutTeam *Permission
83var PermissionReadJobs *Permission
84var PermissionManageJobs *Permission
85var PermissionCreateUserAccessToken *Permission
86var PermissionReadUserAccessToken *Permission
87var PermissionRevokeUserAccessToken *Permission
88var PermissionCreateBot *Permission
89var PermissionAssignBot *Permission
90var PermissionReadBots *Permission
91var PermissionReadOthersBots *Permission
92var PermissionManageBots *Permission
93var PermissionManageOthersBots *Permission
94var PermissionViewMembers *Permission
95var PermissionInviteGuest *Permission
96var PermissionPromoteGuest *Permission
97var PermissionDemoteToGuest *Permission
98var PermissionUseChannelMentions *Permission
99var PermissionUseGroupMentions *Permission
100var PermissionReadOtherUsersTeams *Permission
101var PermissionEditBrand *Permission
102var PermissionManageSharedChannels *Permission
103var PermissionManageSecureConnections *Permission
104var PermissionDownloadComplianceExportResult *Permission
105var PermissionCreateDataRetentionJob *Permission
106var PermissionReadDataRetentionJob *Permission
107var PermissionCreateComplianceExportJob *Permission
108var PermissionReadComplianceExportJob *Permission
109var PermissionReadAudits *Permission
110var PermissionTestElasticsearch *Permission
111var PermissionTestSiteURL *Permission
112var PermissionTestS3 *Permission
113var PermissionReloadConfig *Permission
114var PermissionInvalidateCaches *Permission
115var PermissionRecycleDatabaseConnections *Permission
116var PermissionPurgeElasticsearchIndexes *Permission
117var PermissionTestEmail *Permission
118var PermissionCreateElasticsearchPostIndexingJob *Permission
119var PermissionCreateElasticsearchPostAggregationJob *Permission
120var PermissionReadElasticsearchPostIndexingJob *Permission
121var PermissionReadElasticsearchPostAggregationJob *Permission
122var PermissionPurgeBleveIndexes *Permission
123var PermissionCreatePostBleveIndexesJob *Permission
124var PermissionCreateLdapSyncJob *Permission
125var PermissionReadLdapSyncJob *Permission
126var PermissionTestLdap *Permission
127var PermissionInvalidateEmailInvite *Permission
128var PermissionGetSamlMetadataFromIdp *Permission
129var PermissionAddSamlPublicCert *Permission
130var PermissionAddSamlPrivateCert *Permission
131var PermissionAddSamlIdpCert *Permission
132var PermissionRemoveSamlPublicCert *Permission
133var PermissionRemoveSamlPrivateCert *Permission
134var PermissionRemoveSamlIdpCert *Permission
135var PermissionGetSamlCertStatus *Permission
136var PermissionAddLdapPublicCert *Permission
137var PermissionAddLdapPrivateCert *Permission
138var PermissionRemoveLdapPublicCert *Permission
139var PermissionRemoveLdapPrivateCert *Permission
140var PermissionGetLogs *Permission
141var PermissionGetAnalytics *Permission
142var PermissionReadLicenseInformation *Permission
143var PermissionManageLicenseInformation *Permission
144
145var PermissionSysconsoleReadAbout *Permission
146var PermissionSysconsoleWriteAbout *Permission
147
148var PermissionSysconsoleReadAboutEditionAndLicense *Permission
149var PermissionSysconsoleWriteAboutEditionAndLicense *Permission
150
151var PermissionSysconsoleReadBilling *Permission
152var PermissionSysconsoleWriteBilling *Permission
153
154var PermissionSysconsoleReadReporting *Permission
155var PermissionSysconsoleWriteReporting *Permission
156
157var PermissionSysconsoleReadReportingSiteStatistics *Permission
158var PermissionSysconsoleWriteReportingSiteStatistics *Permission
159
160var PermissionSysconsoleReadReportingTeamStatistics *Permission
161var PermissionSysconsoleWriteReportingTeamStatistics *Permission
162
163var PermissionSysconsoleReadReportingServerLogs *Permission
164var PermissionSysconsoleWriteReportingServerLogs *Permission
165
166var PermissionSysconsoleReadUserManagementUsers *Permission
167var PermissionSysconsoleWriteUserManagementUsers *Permission
168
169var PermissionSysconsoleReadUserManagementGroups *Permission
170var PermissionSysconsoleWriteUserManagementGroups *Permission
171
172var PermissionSysconsoleReadUserManagementTeams *Permission
173var PermissionSysconsoleWriteUserManagementTeams *Permission
174
175var PermissionSysconsoleReadUserManagementChannels *Permission
176var PermissionSysconsoleWriteUserManagementChannels *Permission
177
178var PermissionSysconsoleReadUserManagementPermissions *Permission
179var PermissionSysconsoleWriteUserManagementPermissions *Permission
180
181var PermissionSysconsoleReadUserManagementSystemRoles *Permission
182var PermissionSysconsoleWriteUserManagementSystemRoles *Permission
183
184// DEPRECATED
185var PermissionSysconsoleReadEnvironment *Permission
186
187// DEPRECATED
188var PermissionSysconsoleWriteEnvironment *Permission
189
190var PermissionSysconsoleReadEnvironmentWebServer *Permission
191var PermissionSysconsoleWriteEnvironmentWebServer *Permission
192
193var PermissionSysconsoleReadEnvironmentDatabase *Permission
194var PermissionSysconsoleWriteEnvironmentDatabase *Permission
195
196var PermissionSysconsoleReadEnvironmentElasticsearch *Permission
197var PermissionSysconsoleWriteEnvironmentElasticsearch *Permission
198
199var PermissionSysconsoleReadEnvironmentFileStorage *Permission
200var PermissionSysconsoleWriteEnvironmentFileStorage *Permission
201
202var PermissionSysconsoleReadEnvironmentImageProxy *Permission
203var PermissionSysconsoleWriteEnvironmentImageProxy *Permission
204
205var PermissionSysconsoleReadEnvironmentSMTP *Permission
206var PermissionSysconsoleWriteEnvironmentSMTP *Permission
207
208var PermissionSysconsoleReadEnvironmentPushNotificationServer *Permission
209var PermissionSysconsoleWriteEnvironmentPushNotificationServer *Permission
210
211var PermissionSysconsoleReadEnvironmentHighAvailability *Permission
212var PermissionSysconsoleWriteEnvironmentHighAvailability *Permission
213
214var PermissionSysconsoleReadEnvironmentRateLimiting *Permission
215var PermissionSysconsoleWriteEnvironmentRateLimiting *Permission
216
217var PermissionSysconsoleReadEnvironmentLogging *Permission
218var PermissionSysconsoleWriteEnvironmentLogging *Permission
219
220var PermissionSysconsoleReadEnvironmentSessionLengths *Permission
221var PermissionSysconsoleWriteEnvironmentSessionLengths *Permission
222
223var PermissionSysconsoleReadEnvironmentPerformanceMonitoring *Permission
224var PermissionSysconsoleWriteEnvironmentPerformanceMonitoring *Permission
225
226var PermissionSysconsoleReadEnvironmentDeveloper *Permission
227var PermissionSysconsoleWriteEnvironmentDeveloper *Permission
228
229var PermissionSysconsoleReadSite *Permission
230var PermissionSysconsoleWriteSite *Permission
231
232var PermissionSysconsoleReadSiteCustomization *Permission
233var PermissionSysconsoleWriteSiteCustomization *Permission
234
235var PermissionSysconsoleReadSiteLocalization *Permission
236var PermissionSysconsoleWriteSiteLocalization *Permission
237
238var PermissionSysconsoleReadSiteUsersAndTeams *Permission
239var PermissionSysconsoleWriteSiteUsersAndTeams *Permission
240
241var PermissionSysconsoleReadSiteNotifications *Permission
242var PermissionSysconsoleWriteSiteNotifications *Permission
243
244var PermissionSysconsoleReadSiteAnnouncementBanner *Permission
245var PermissionSysconsoleWriteSiteAnnouncementBanner *Permission
246
247var PermissionSysconsoleReadSiteEmoji *Permission
248var PermissionSysconsoleWriteSiteEmoji *Permission
249
250var PermissionSysconsoleReadSitePosts *Permission
251var PermissionSysconsoleWriteSitePosts *Permission
252
253var PermissionSysconsoleReadSiteFileSharingAndDownloads *Permission
254var PermissionSysconsoleWriteSiteFileSharingAndDownloads *Permission
255
256var PermissionSysconsoleReadSitePublicLinks *Permission
257var PermissionSysconsoleWriteSitePublicLinks *Permission
258
259var PermissionSysconsoleReadSiteNotices *Permission
260var PermissionSysconsoleWriteSiteNotices *Permission
261
262var PermissionSysconsoleReadAuthentication *Permission
263var PermissionSysconsoleWriteAuthentication *Permission
264
265var PermissionSysconsoleReadAuthenticationSignup *Permission
266var PermissionSysconsoleWriteAuthenticationSignup *Permission
267
268var PermissionSysconsoleReadAuthenticationEmail *Permission
269var PermissionSysconsoleWriteAuthenticationEmail *Permission
270
271var PermissionSysconsoleReadAuthenticationPassword *Permission
272var PermissionSysconsoleWriteAuthenticationPassword *Permission
273
274var PermissionSysconsoleReadAuthenticationMfa *Permission
275var PermissionSysconsoleWriteAuthenticationMfa *Permission
276
277var PermissionSysconsoleReadAuthenticationLdap *Permission
278var PermissionSysconsoleWriteAuthenticationLdap *Permission
279
280var PermissionSysconsoleReadAuthenticationSaml *Permission
281var PermissionSysconsoleWriteAuthenticationSaml *Permission
282
283var PermissionSysconsoleReadAuthenticationOpenid *Permission
284var PermissionSysconsoleWriteAuthenticationOpenid *Permission
285
286var PermissionSysconsoleReadAuthenticationGuestAccess *Permission
287var PermissionSysconsoleWriteAuthenticationGuestAccess *Permission
288
289var PermissionSysconsoleReadPlugins *Permission
290var PermissionSysconsoleWritePlugins *Permission
291
292var PermissionSysconsoleReadIntegrations *Permission
293var PermissionSysconsoleWriteIntegrations *Permission
294
295var PermissionSysconsoleReadIntegrationsIntegrationManagement *Permission
296var PermissionSysconsoleWriteIntegrationsIntegrationManagement *Permission
297
298var PermissionSysconsoleReadIntegrationsBotAccounts *Permission
299var PermissionSysconsoleWriteIntegrationsBotAccounts *Permission
300
301var PermissionSysconsoleReadIntegrationsGif *Permission
302var PermissionSysconsoleWriteIntegrationsGif *Permission
303
304var PermissionSysconsoleReadIntegrationsCors *Permission
305var PermissionSysconsoleWriteIntegrationsCors *Permission
306
307var PermissionSysconsoleReadCompliance *Permission
308var PermissionSysconsoleWriteCompliance *Permission
309
310var PermissionSysconsoleReadComplianceDataRetentionPolicy *Permission
311var PermissionSysconsoleWriteComplianceDataRetentionPolicy *Permission
312
313var PermissionSysconsoleReadComplianceComplianceExport *Permission
314var PermissionSysconsoleWriteComplianceComplianceExport *Permission
315
316var PermissionSysconsoleReadComplianceComplianceMonitoring *Permission
317var PermissionSysconsoleWriteComplianceComplianceMonitoring *Permission
318
319var PermissionSysconsoleReadComplianceCustomTermsOfService *Permission
320var PermissionSysconsoleWriteComplianceCustomTermsOfService *Permission
321
322var PermissionSysconsoleReadExperimental *Permission
323var PermissionSysconsoleWriteExperimental *Permission
324
325var PermissionSysconsoleReadExperimentalFeatures *Permission
326var PermissionSysconsoleWriteExperimentalFeatures *Permission
327
328var PermissionSysconsoleReadExperimentalFeatureFlags *Permission
329var PermissionSysconsoleWriteExperimentalFeatureFlags *Permission
330
331var PermissionSysconsoleReadExperimentalBleve *Permission
332var PermissionSysconsoleWriteExperimentalBleve *Permission
333
334// General permission that encompasses all system admin functions
335// in the future this could be broken up to allow access to some
336// admin functions but not others
337var PermissionManageSystem *Permission
338
339var AllPermissions []*Permission
340var DeprecatedPermissions []*Permission
341
342var ChannelModeratedPermissions []string
343var ChannelModeratedPermissionsMap map[string]string
344
345var SysconsoleReadPermissions []*Permission
346var SysconsoleWritePermissions []*Permission
347
348func initializePermissions() {
349	PermissionInviteUser = &Permission{
350		"invite_user",
351		"authentication.permissions.team_invite_user.name",
352		"authentication.permissions.team_invite_user.description",
353		PermissionScopeTeam,
354	}
355	PermissionAddUserToTeam = &Permission{
356		"add_user_to_team",
357		"authentication.permissions.add_user_to_team.name",
358		"authentication.permissions.add_user_to_team.description",
359		PermissionScopeTeam,
360	}
361	PermissionUseSlashCommands = &Permission{
362		"use_slash_commands",
363		"authentication.permissions.team_use_slash_commands.name",
364		"authentication.permissions.team_use_slash_commands.description",
365		PermissionScopeChannel,
366	}
367	PermissionManageSlashCommands = &Permission{
368		"manage_slash_commands",
369		"authentication.permissions.manage_slash_commands.name",
370		"authentication.permissions.manage_slash_commands.description",
371		PermissionScopeTeam,
372	}
373	PermissionManageOthersSlashCommands = &Permission{
374		"manage_others_slash_commands",
375		"authentication.permissions.manage_others_slash_commands.name",
376		"authentication.permissions.manage_others_slash_commands.description",
377		PermissionScopeTeam,
378	}
379	PermissionCreatePublicChannel = &Permission{
380		"create_public_channel",
381		"authentication.permissions.create_public_channel.name",
382		"authentication.permissions.create_public_channel.description",
383		PermissionScopeTeam,
384	}
385	PermissionCreatePrivateChannel = &Permission{
386		"create_private_channel",
387		"authentication.permissions.create_private_channel.name",
388		"authentication.permissions.create_private_channel.description",
389		PermissionScopeTeam,
390	}
391	PermissionManagePublicChannelMembers = &Permission{
392		"manage_public_channel_members",
393		"authentication.permissions.manage_public_channel_members.name",
394		"authentication.permissions.manage_public_channel_members.description",
395		PermissionScopeChannel,
396	}
397	PermissionManagePrivateChannelMembers = &Permission{
398		"manage_private_channel_members",
399		"authentication.permissions.manage_private_channel_members.name",
400		"authentication.permissions.manage_private_channel_members.description",
401		PermissionScopeChannel,
402	}
403	PermissionConvertPublicChannelToPrivate = &Permission{
404		"convert_public_channel_to_private",
405		"authentication.permissions.convert_public_channel_to_private.name",
406		"authentication.permissions.convert_public_channel_to_private.description",
407		PermissionScopeChannel,
408	}
409	PermissionConvertPrivateChannelToPublic = &Permission{
410		"convert_private_channel_to_public",
411		"authentication.permissions.convert_private_channel_to_public.name",
412		"authentication.permissions.convert_private_channel_to_public.description",
413		PermissionScopeChannel,
414	}
415	PermissionAssignSystemAdminRole = &Permission{
416		"assign_system_admin_role",
417		"authentication.permissions.assign_system_admin_role.name",
418		"authentication.permissions.assign_system_admin_role.description",
419		PermissionScopeSystem,
420	}
421	PermissionManageRoles = &Permission{
422		"manage_roles",
423		"authentication.permissions.manage_roles.name",
424		"authentication.permissions.manage_roles.description",
425		PermissionScopeSystem,
426	}
427	PermissionManageTeamRoles = &Permission{
428		"manage_team_roles",
429		"authentication.permissions.manage_team_roles.name",
430		"authentication.permissions.manage_team_roles.description",
431		PermissionScopeTeam,
432	}
433	PermissionManageChannelRoles = &Permission{
434		"manage_channel_roles",
435		"authentication.permissions.manage_channel_roles.name",
436		"authentication.permissions.manage_channel_roles.description",
437		PermissionScopeChannel,
438	}
439	PermissionManageSystem = &Permission{
440		"manage_system",
441		"authentication.permissions.manage_system.name",
442		"authentication.permissions.manage_system.description",
443		PermissionScopeSystem,
444	}
445	PermissionCreateDirectChannel = &Permission{
446		"create_direct_channel",
447		"authentication.permissions.create_direct_channel.name",
448		"authentication.permissions.create_direct_channel.description",
449		PermissionScopeSystem,
450	}
451	PermissionCreateGroupChannel = &Permission{
452		"create_group_channel",
453		"authentication.permissions.create_group_channel.name",
454		"authentication.permissions.create_group_channel.description",
455		PermissionScopeSystem,
456	}
457	PermissionManagePublicChannelProperties = &Permission{
458		"manage_public_channel_properties",
459		"authentication.permissions.manage_public_channel_properties.name",
460		"authentication.permissions.manage_public_channel_properties.description",
461		PermissionScopeChannel,
462	}
463	PermissionManagePrivateChannelProperties = &Permission{
464		"manage_private_channel_properties",
465		"authentication.permissions.manage_private_channel_properties.name",
466		"authentication.permissions.manage_private_channel_properties.description",
467		PermissionScopeChannel,
468	}
469	PermissionListPublicTeams = &Permission{
470		"list_public_teams",
471		"authentication.permissions.list_public_teams.name",
472		"authentication.permissions.list_public_teams.description",
473		PermissionScopeSystem,
474	}
475	PermissionJoinPublicTeams = &Permission{
476		"join_public_teams",
477		"authentication.permissions.join_public_teams.name",
478		"authentication.permissions.join_public_teams.description",
479		PermissionScopeSystem,
480	}
481	PermissionListPrivateTeams = &Permission{
482		"list_private_teams",
483		"authentication.permissions.list_private_teams.name",
484		"authentication.permissions.list_private_teams.description",
485		PermissionScopeSystem,
486	}
487	PermissionJoinPrivateTeams = &Permission{
488		"join_private_teams",
489		"authentication.permissions.join_private_teams.name",
490		"authentication.permissions.join_private_teams.description",
491		PermissionScopeSystem,
492	}
493	PermissionListTeamChannels = &Permission{
494		"list_team_channels",
495		"authentication.permissions.list_team_channels.name",
496		"authentication.permissions.list_team_channels.description",
497		PermissionScopeTeam,
498	}
499	PermissionJoinPublicChannels = &Permission{
500		"join_public_channels",
501		"authentication.permissions.join_public_channels.name",
502		"authentication.permissions.join_public_channels.description",
503		PermissionScopeTeam,
504	}
505	PermissionDeletePublicChannel = &Permission{
506		"delete_public_channel",
507		"authentication.permissions.delete_public_channel.name",
508		"authentication.permissions.delete_public_channel.description",
509		PermissionScopeChannel,
510	}
511	PermissionDeletePrivateChannel = &Permission{
512		"delete_private_channel",
513		"authentication.permissions.delete_private_channel.name",
514		"authentication.permissions.delete_private_channel.description",
515		PermissionScopeChannel,
516	}
517	PermissionEditOtherUsers = &Permission{
518		"edit_other_users",
519		"authentication.permissions.edit_other_users.name",
520		"authentication.permissions.edit_other_users.description",
521		PermissionScopeSystem,
522	}
523	PermissionReadChannel = &Permission{
524		"read_channel",
525		"authentication.permissions.read_channel.name",
526		"authentication.permissions.read_channel.description",
527		PermissionScopeChannel,
528	}
529	PermissionReadPublicChannelGroups = &Permission{
530		"read_public_channel_groups",
531		"authentication.permissions.read_public_channel_groups.name",
532		"authentication.permissions.read_public_channel_groups.description",
533		PermissionScopeChannel,
534	}
535	PermissionReadPrivateChannelGroups = &Permission{
536		"read_private_channel_groups",
537		"authentication.permissions.read_private_channel_groups.name",
538		"authentication.permissions.read_private_channel_groups.description",
539		PermissionScopeChannel,
540	}
541	PermissionReadPublicChannel = &Permission{
542		"read_public_channel",
543		"authentication.permissions.read_public_channel.name",
544		"authentication.permissions.read_public_channel.description",
545		PermissionScopeTeam,
546	}
547	PermissionAddReaction = &Permission{
548		"add_reaction",
549		"authentication.permissions.add_reaction.name",
550		"authentication.permissions.add_reaction.description",
551		PermissionScopeChannel,
552	}
553	PermissionRemoveReaction = &Permission{
554		"remove_reaction",
555		"authentication.permissions.remove_reaction.name",
556		"authentication.permissions.remove_reaction.description",
557		PermissionScopeChannel,
558	}
559	PermissionRemoveOthersReactions = &Permission{
560		"remove_others_reactions",
561		"authentication.permissions.remove_others_reactions.name",
562		"authentication.permissions.remove_others_reactions.description",
563		PermissionScopeChannel,
564	}
565	// DEPRECATED
566	PermissionPermanentDeleteUser = &Permission{
567		"permanent_delete_user",
568		"authentication.permissions.permanent_delete_user.name",
569		"authentication.permissions.permanent_delete_user.description",
570		PermissionScopeSystem,
571	}
572	PermissionUploadFile = &Permission{
573		"upload_file",
574		"authentication.permissions.upload_file.name",
575		"authentication.permissions.upload_file.description",
576		PermissionScopeChannel,
577	}
578	PermissionGetPublicLink = &Permission{
579		"get_public_link",
580		"authentication.permissions.get_public_link.name",
581		"authentication.permissions.get_public_link.description",
582		PermissionScopeSystem,
583	}
584	// DEPRECATED
585	PermissionManageWebhooks = &Permission{
586		"manage_webhooks",
587		"authentication.permissions.manage_webhooks.name",
588		"authentication.permissions.manage_webhooks.description",
589		PermissionScopeTeam,
590	}
591	// DEPRECATED
592	PermissionManageOthersWebhooks = &Permission{
593		"manage_others_webhooks",
594		"authentication.permissions.manage_others_webhooks.name",
595		"authentication.permissions.manage_others_webhooks.description",
596		PermissionScopeTeam,
597	}
598	PermissionManageIncomingWebhooks = &Permission{
599		"manage_incoming_webhooks",
600		"authentication.permissions.manage_incoming_webhooks.name",
601		"authentication.permissions.manage_incoming_webhooks.description",
602		PermissionScopeTeam,
603	}
604	PermissionManageOutgoingWebhooks = &Permission{
605		"manage_outgoing_webhooks",
606		"authentication.permissions.manage_outgoing_webhooks.name",
607		"authentication.permissions.manage_outgoing_webhooks.description",
608		PermissionScopeTeam,
609	}
610	PermissionManageOthersIncomingWebhooks = &Permission{
611		"manage_others_incoming_webhooks",
612		"authentication.permissions.manage_others_incoming_webhooks.name",
613		"authentication.permissions.manage_others_incoming_webhooks.description",
614		PermissionScopeTeam,
615	}
616	PermissionManageOthersOutgoingWebhooks = &Permission{
617		"manage_others_outgoing_webhooks",
618		"authentication.permissions.manage_others_outgoing_webhooks.name",
619		"authentication.permissions.manage_others_outgoing_webhooks.description",
620		PermissionScopeTeam,
621	}
622	PermissionManageOAuth = &Permission{
623		"manage_oauth",
624		"authentication.permissions.manage_oauth.name",
625		"authentication.permissions.manage_oauth.description",
626		PermissionScopeSystem,
627	}
628	PermissionManageSystemWideOAuth = &Permission{
629		"manage_system_wide_oauth",
630		"authentication.permissions.manage_system_wide_oauth.name",
631		"authentication.permissions.manage_system_wide_oauth.description",
632		PermissionScopeSystem,
633	}
634	// DEPRECATED
635	PermissionManageEmojis = &Permission{
636		"manage_emojis",
637		"authentication.permissions.manage_emojis.name",
638		"authentication.permissions.manage_emojis.description",
639		PermissionScopeTeam,
640	}
641	// DEPRECATED
642	PermissionManageOthersEmojis = &Permission{
643		"manage_others_emojis",
644		"authentication.permissions.manage_others_emojis.name",
645		"authentication.permissions.manage_others_emojis.description",
646		PermissionScopeTeam,
647	}
648	PermissionCreateEmojis = &Permission{
649		"create_emojis",
650		"authentication.permissions.create_emojis.name",
651		"authentication.permissions.create_emojis.description",
652		PermissionScopeTeam,
653	}
654	PermissionDeleteEmojis = &Permission{
655		"delete_emojis",
656		"authentication.permissions.delete_emojis.name",
657		"authentication.permissions.delete_emojis.description",
658		PermissionScopeTeam,
659	}
660	PermissionDeleteOthersEmojis = &Permission{
661		"delete_others_emojis",
662		"authentication.permissions.delete_others_emojis.name",
663		"authentication.permissions.delete_others_emojis.description",
664		PermissionScopeTeam,
665	}
666	PermissionCreatePost = &Permission{
667		"create_post",
668		"authentication.permissions.create_post.name",
669		"authentication.permissions.create_post.description",
670		PermissionScopeChannel,
671	}
672	PermissionCreatePostPublic = &Permission{
673		"create_post_public",
674		"authentication.permissions.create_post_public.name",
675		"authentication.permissions.create_post_public.description",
676		PermissionScopeChannel,
677	}
678	PermissionCreatePostEphemeral = &Permission{
679		"create_post_ephemeral",
680		"authentication.permissions.create_post_ephemeral.name",
681		"authentication.permissions.create_post_ephemeral.description",
682		PermissionScopeChannel,
683	}
684	PermissionEditPost = &Permission{
685		"edit_post",
686		"authentication.permissions.edit_post.name",
687		"authentication.permissions.edit_post.description",
688		PermissionScopeChannel,
689	}
690	PermissionEditOthersPosts = &Permission{
691		"edit_others_posts",
692		"authentication.permissions.edit_others_posts.name",
693		"authentication.permissions.edit_others_posts.description",
694		PermissionScopeChannel,
695	}
696	PermissionDeletePost = &Permission{
697		"delete_post",
698		"authentication.permissions.delete_post.name",
699		"authentication.permissions.delete_post.description",
700		PermissionScopeChannel,
701	}
702	PermissionDeleteOthersPosts = &Permission{
703		"delete_others_posts",
704		"authentication.permissions.delete_others_posts.name",
705		"authentication.permissions.delete_others_posts.description",
706		PermissionScopeChannel,
707	}
708	PermissionManageSharedChannels = &Permission{
709		"manage_shared_channels",
710		"authentication.permissions.manage_shared_channels.name",
711		"authentication.permissions.manage_shared_channels.description",
712		PermissionScopeSystem,
713	}
714	PermissionManageSecureConnections = &Permission{
715		"manage_secure_connections",
716		"authentication.permissions.manage_secure_connections.name",
717		"authentication.permissions.manage_secure_connections.description",
718		PermissionScopeSystem,
719	}
720
721	PermissionCreateDataRetentionJob = &Permission{
722		"create_data_retention_job",
723		"",
724		"",
725		PermissionScopeSystem,
726	}
727	PermissionReadDataRetentionJob = &Permission{
728		"read_data_retention_job",
729		"",
730		"",
731		PermissionScopeSystem,
732	}
733
734	PermissionCreateComplianceExportJob = &Permission{
735		"create_compliance_export_job",
736		"",
737		"",
738		PermissionScopeSystem,
739	}
740	PermissionReadComplianceExportJob = &Permission{
741		"read_compliance_export_job",
742		"",
743		"",
744		PermissionScopeSystem,
745	}
746
747	PermissionReadAudits = &Permission{
748		"read_audits",
749		"",
750		"",
751		PermissionScopeSystem,
752	}
753
754	PermissionPurgeBleveIndexes = &Permission{
755		"purge_bleve_indexes",
756		"",
757		"",
758		PermissionScopeSystem,
759	}
760
761	PermissionCreatePostBleveIndexesJob = &Permission{
762		"create_post_bleve_indexes_job",
763		"",
764		"",
765		PermissionScopeSystem,
766	}
767
768	PermissionCreateLdapSyncJob = &Permission{
769		"create_ldap_sync_job",
770		"",
771		"",
772		PermissionScopeSystem,
773	}
774	PermissionReadLdapSyncJob = &Permission{
775		"read_ldap_sync_job",
776		"",
777		"",
778		PermissionScopeSystem,
779	}
780
781	PermissionTestLdap = &Permission{
782		"test_ldap",
783		"",
784		"",
785		PermissionScopeSystem,
786	}
787
788	PermissionInvalidateEmailInvite = &Permission{
789		"invalidate_email_invite",
790		"",
791		"",
792		PermissionScopeSystem,
793	}
794	PermissionGetSamlMetadataFromIdp = &Permission{
795		"get_saml_metadata_from_idp",
796		"",
797		"",
798		PermissionScopeSystem,
799	}
800	PermissionAddSamlPublicCert = &Permission{
801		"add_saml_public_cert",
802		"",
803		"",
804		PermissionScopeSystem,
805	}
806
807	PermissionAddSamlPrivateCert = &Permission{
808		"add_saml_private_cert",
809		"",
810		"",
811		PermissionScopeSystem,
812	}
813
814	PermissionAddSamlIdpCert = &Permission{
815		"add_saml_idp_cert",
816		"",
817		"",
818		PermissionScopeSystem,
819	}
820
821	PermissionRemoveSamlPublicCert = &Permission{
822		"remove_saml_public_cert",
823		"",
824		"",
825		PermissionScopeSystem,
826	}
827
828	PermissionRemoveSamlPrivateCert = &Permission{
829		"remove_saml_private_cert",
830		"",
831		"",
832		PermissionScopeSystem,
833	}
834
835	PermissionRemoveSamlIdpCert = &Permission{
836		"remove_saml_idp_cert",
837		"",
838		"",
839		PermissionScopeSystem,
840	}
841
842	PermissionGetSamlCertStatus = &Permission{
843		"get_saml_cert_status",
844		"",
845		"",
846		PermissionScopeSystem,
847	}
848
849	PermissionAddLdapPublicCert = &Permission{
850		"add_ldap_public_cert",
851		"",
852		"",
853		PermissionScopeSystem,
854	}
855
856	PermissionAddLdapPrivateCert = &Permission{
857		"add_ldap_private_cert",
858		"",
859		"",
860		PermissionScopeSystem,
861	}
862
863	PermissionRemoveLdapPublicCert = &Permission{
864		"remove_ldap_public_cert",
865		"",
866		"",
867		PermissionScopeSystem,
868	}
869
870	PermissionRemoveLdapPrivateCert = &Permission{
871		"remove_ldap_private_cert",
872		"",
873		"",
874		PermissionScopeSystem,
875	}
876
877	PermissionGetLogs = &Permission{
878		"get_logs",
879		"",
880		"",
881		PermissionScopeSystem,
882	}
883
884	PermissionReadLicenseInformation = &Permission{
885		"read_license_information",
886		"",
887		"",
888		PermissionScopeSystem,
889	}
890
891	PermissionGetAnalytics = &Permission{
892		"get_analytics",
893		"",
894		"",
895		PermissionScopeSystem,
896	}
897
898	PermissionManageLicenseInformation = &Permission{
899		"manage_license_information",
900		"",
901		"",
902		PermissionScopeSystem,
903	}
904
905	PermissionDownloadComplianceExportResult = &Permission{
906		"download_compliance_export_result",
907		"authentication.permissions.download_compliance_export_result.name",
908		"authentication.permissions.download_compliance_export_result.description",
909		PermissionScopeSystem,
910	}
911
912	PermissionTestSiteURL = &Permission{
913		"test_site_url",
914		"",
915		"",
916		PermissionScopeSystem,
917	}
918	PermissionTestElasticsearch = &Permission{
919		"test_elasticsearch",
920		"",
921		"",
922		PermissionScopeSystem,
923	}
924	PermissionTestS3 = &Permission{
925		"test_s3",
926		"",
927		"",
928		PermissionScopeSystem,
929	}
930	PermissionReloadConfig = &Permission{
931		"reload_config",
932		"",
933		"",
934		PermissionScopeSystem,
935	}
936	PermissionInvalidateCaches = &Permission{
937		"invalidate_caches",
938		"",
939		"",
940		PermissionScopeSystem,
941	}
942	PermissionRecycleDatabaseConnections = &Permission{
943		"recycle_database_connections",
944		"",
945		"",
946		PermissionScopeSystem,
947	}
948	PermissionPurgeElasticsearchIndexes = &Permission{
949		"purge_elasticsearch_indexes",
950		"",
951		"",
952		PermissionScopeSystem,
953	}
954	PermissionTestEmail = &Permission{
955		"test_email",
956		"",
957		"",
958		PermissionScopeSystem,
959	}
960	PermissionCreateElasticsearchPostIndexingJob = &Permission{
961		"create_elasticsearch_post_indexing_job",
962		"",
963		"",
964		PermissionScopeSystem,
965	}
966	PermissionCreateElasticsearchPostAggregationJob = &Permission{
967		"create_elasticsearch_post_aggregation_job",
968		"",
969		"",
970		PermissionScopeSystem,
971	}
972	PermissionReadElasticsearchPostIndexingJob = &Permission{
973		"read_elasticsearch_post_indexing_job",
974		"",
975		"",
976		PermissionScopeSystem,
977	}
978	PermissionReadElasticsearchPostAggregationJob = &Permission{
979		"read_elasticsearch_post_aggregation_job",
980		"",
981		"",
982		PermissionScopeSystem,
983	}
984
985	PermissionRemoveUserFromTeam = &Permission{
986		"remove_user_from_team",
987		"authentication.permissions.remove_user_from_team.name",
988		"authentication.permissions.remove_user_from_team.description",
989		PermissionScopeTeam,
990	}
991	PermissionCreateTeam = &Permission{
992		"create_team",
993		"authentication.permissions.create_team.name",
994		"authentication.permissions.create_team.description",
995		PermissionScopeSystem,
996	}
997	PermissionManageTeam = &Permission{
998		"manage_team",
999		"authentication.permissions.manage_team.name",
1000		"authentication.permissions.manage_team.description",
1001		PermissionScopeTeam,
1002	}
1003	PermissionImportTeam = &Permission{
1004		"import_team",
1005		"authentication.permissions.import_team.name",
1006		"authentication.permissions.import_team.description",
1007		PermissionScopeTeam,
1008	}
1009	PermissionViewTeam = &Permission{
1010		"view_team",
1011		"authentication.permissions.view_team.name",
1012		"authentication.permissions.view_team.description",
1013		PermissionScopeTeam,
1014	}
1015	PermissionListUsersWithoutTeam = &Permission{
1016		"list_users_without_team",
1017		"authentication.permissions.list_users_without_team.name",
1018		"authentication.permissions.list_users_without_team.description",
1019		PermissionScopeSystem,
1020	}
1021	PermissionCreateUserAccessToken = &Permission{
1022		"create_user_access_token",
1023		"authentication.permissions.create_user_access_token.name",
1024		"authentication.permissions.create_user_access_token.description",
1025		PermissionScopeSystem,
1026	}
1027	PermissionReadUserAccessToken = &Permission{
1028		"read_user_access_token",
1029		"authentication.permissions.read_user_access_token.name",
1030		"authentication.permissions.read_user_access_token.description",
1031		PermissionScopeSystem,
1032	}
1033	PermissionRevokeUserAccessToken = &Permission{
1034		"revoke_user_access_token",
1035		"authentication.permissions.revoke_user_access_token.name",
1036		"authentication.permissions.revoke_user_access_token.description",
1037		PermissionScopeSystem,
1038	}
1039	PermissionCreateBot = &Permission{
1040		"create_bot",
1041		"authentication.permissions.create_bot.name",
1042		"authentication.permissions.create_bot.description",
1043		PermissionScopeSystem,
1044	}
1045	PermissionAssignBot = &Permission{
1046		"assign_bot",
1047		"authentication.permissions.assign_bot.name",
1048		"authentication.permissions.assign_bot.description",
1049		PermissionScopeSystem,
1050	}
1051	PermissionReadBots = &Permission{
1052		"read_bots",
1053		"authentication.permissions.read_bots.name",
1054		"authentication.permissions.read_bots.description",
1055		PermissionScopeSystem,
1056	}
1057	PermissionReadOthersBots = &Permission{
1058		"read_others_bots",
1059		"authentication.permissions.read_others_bots.name",
1060		"authentication.permissions.read_others_bots.description",
1061		PermissionScopeSystem,
1062	}
1063	PermissionManageBots = &Permission{
1064		"manage_bots",
1065		"authentication.permissions.manage_bots.name",
1066		"authentication.permissions.manage_bots.description",
1067		PermissionScopeSystem,
1068	}
1069	PermissionManageOthersBots = &Permission{
1070		"manage_others_bots",
1071		"authentication.permissions.manage_others_bots.name",
1072		"authentication.permissions.manage_others_bots.description",
1073		PermissionScopeSystem,
1074	}
1075	PermissionReadJobs = &Permission{
1076		"read_jobs",
1077		"authentication.permisssions.read_jobs.name",
1078		"authentication.permisssions.read_jobs.description",
1079		PermissionScopeSystem,
1080	}
1081	PermissionManageJobs = &Permission{
1082		"manage_jobs",
1083		"authentication.permisssions.manage_jobs.name",
1084		"authentication.permisssions.manage_jobs.description",
1085		PermissionScopeSystem,
1086	}
1087	PermissionViewMembers = &Permission{
1088		"view_members",
1089		"authentication.permisssions.view_members.name",
1090		"authentication.permisssions.view_members.description",
1091		PermissionScopeTeam,
1092	}
1093	PermissionInviteGuest = &Permission{
1094		"invite_guest",
1095		"authentication.permissions.invite_guest.name",
1096		"authentication.permissions.invite_guest.description",
1097		PermissionScopeTeam,
1098	}
1099	PermissionPromoteGuest = &Permission{
1100		"promote_guest",
1101		"authentication.permissions.promote_guest.name",
1102		"authentication.permissions.promote_guest.description",
1103		PermissionScopeSystem,
1104	}
1105	PermissionDemoteToGuest = &Permission{
1106		"demote_to_guest",
1107		"authentication.permissions.demote_to_guest.name",
1108		"authentication.permissions.demote_to_guest.description",
1109		PermissionScopeSystem,
1110	}
1111	PermissionUseChannelMentions = &Permission{
1112		"use_channel_mentions",
1113		"authentication.permissions.use_channel_mentions.name",
1114		"authentication.permissions.use_channel_mentions.description",
1115		PermissionScopeChannel,
1116	}
1117	PermissionUseGroupMentions = &Permission{
1118		"use_group_mentions",
1119		"authentication.permissions.use_group_mentions.name",
1120		"authentication.permissions.use_group_mentions.description",
1121		PermissionScopeChannel,
1122	}
1123	PermissionReadOtherUsersTeams = &Permission{
1124		"read_other_users_teams",
1125		"authentication.permissions.read_other_users_teams.name",
1126		"authentication.permissions.read_other_users_teams.description",
1127		PermissionScopeSystem,
1128	}
1129	PermissionEditBrand = &Permission{
1130		"edit_brand",
1131		"authentication.permissions.edit_brand.name",
1132		"authentication.permissions.edit_brand.description",
1133		PermissionScopeSystem,
1134	}
1135	// DEPRECATED
1136	PermissionSysconsoleReadAbout = &Permission{
1137		"sysconsole_read_about",
1138		"authentication.permissions.use_group_mentions.name",
1139		"authentication.permissions.use_group_mentions.description",
1140		PermissionScopeSystem,
1141	}
1142	// DEPRECATED
1143	PermissionSysconsoleWriteAbout = &Permission{
1144		"sysconsole_write_about",
1145		"authentication.permissions.use_group_mentions.name",
1146		"authentication.permissions.use_group_mentions.description",
1147		PermissionScopeSystem,
1148	}
1149	PermissionSysconsoleReadAboutEditionAndLicense = &Permission{
1150		"sysconsole_read_about_edition_and_license",
1151		"",
1152		"",
1153		PermissionScopeSystem,
1154	}
1155	PermissionSysconsoleWriteAboutEditionAndLicense = &Permission{
1156		"sysconsole_write_about_edition_and_license",
1157		"",
1158		"",
1159		PermissionScopeSystem,
1160	}
1161	PermissionSysconsoleReadBilling = &Permission{
1162		"sysconsole_read_billing",
1163		"",
1164		"",
1165		PermissionScopeSystem,
1166	}
1167	PermissionSysconsoleWriteBilling = &Permission{
1168		"sysconsole_write_billing",
1169		"",
1170		"",
1171		PermissionScopeSystem,
1172	}
1173	// DEPRECATED
1174	PermissionSysconsoleReadReporting = &Permission{
1175		"sysconsole_read_reporting",
1176		"authentication.permissions.use_group_mentions.name",
1177		"authentication.permissions.use_group_mentions.description",
1178		PermissionScopeSystem,
1179	}
1180	// DEPRECATED
1181	PermissionSysconsoleWriteReporting = &Permission{
1182		"sysconsole_write_reporting",
1183		"authentication.permissions.use_group_mentions.name",
1184		"authentication.permissions.use_group_mentions.description",
1185		PermissionScopeSystem,
1186	}
1187	PermissionSysconsoleReadReportingSiteStatistics = &Permission{
1188		"sysconsole_read_reporting_site_statistics",
1189		"",
1190		"",
1191		PermissionScopeSystem,
1192	}
1193	PermissionSysconsoleWriteReportingSiteStatistics = &Permission{
1194		"sysconsole_write_reporting_site_statistics",
1195		"",
1196		"",
1197		PermissionScopeSystem,
1198	}
1199	PermissionSysconsoleReadReportingTeamStatistics = &Permission{
1200		"sysconsole_read_reporting_team_statistics",
1201		"",
1202		"",
1203		PermissionScopeSystem,
1204	}
1205	PermissionSysconsoleWriteReportingTeamStatistics = &Permission{
1206		"sysconsole_write_reporting_team_statistics",
1207		"",
1208		"",
1209		PermissionScopeSystem,
1210	}
1211	PermissionSysconsoleReadReportingServerLogs = &Permission{
1212		"sysconsole_read_reporting_server_logs",
1213		"",
1214		"",
1215		PermissionScopeSystem,
1216	}
1217	PermissionSysconsoleWriteReportingServerLogs = &Permission{
1218		"sysconsole_write_reporting_server_logs",
1219		"",
1220		"",
1221		PermissionScopeSystem,
1222	}
1223	PermissionSysconsoleReadUserManagementUsers = &Permission{
1224		"sysconsole_read_user_management_users",
1225		"authentication.permissions.use_group_mentions.name",
1226		"authentication.permissions.use_group_mentions.description",
1227		PermissionScopeSystem,
1228	}
1229	PermissionSysconsoleWriteUserManagementUsers = &Permission{
1230		"sysconsole_write_user_management_users",
1231		"authentication.permissions.use_group_mentions.name",
1232		"authentication.permissions.use_group_mentions.description",
1233		PermissionScopeSystem,
1234	}
1235	PermissionSysconsoleReadUserManagementGroups = &Permission{
1236		"sysconsole_read_user_management_groups",
1237		"authentication.permissions.use_group_mentions.name",
1238		"authentication.permissions.use_group_mentions.description",
1239		PermissionScopeSystem,
1240	}
1241	PermissionSysconsoleWriteUserManagementGroups = &Permission{
1242		"sysconsole_write_user_management_groups",
1243		"authentication.permissions.use_group_mentions.name",
1244		"authentication.permissions.use_group_mentions.description",
1245		PermissionScopeSystem,
1246	}
1247	PermissionSysconsoleReadUserManagementTeams = &Permission{
1248		"sysconsole_read_user_management_teams",
1249		"authentication.permissions.use_group_mentions.name",
1250		"authentication.permissions.use_group_mentions.description",
1251		PermissionScopeSystem,
1252	}
1253	PermissionSysconsoleWriteUserManagementTeams = &Permission{
1254		"sysconsole_write_user_management_teams",
1255		"authentication.permissions.use_group_mentions.name",
1256		"authentication.permissions.use_group_mentions.description",
1257		PermissionScopeSystem,
1258	}
1259	PermissionSysconsoleReadUserManagementChannels = &Permission{
1260		"sysconsole_read_user_management_channels",
1261		"authentication.permissions.use_group_mentions.name",
1262		"authentication.permissions.use_group_mentions.description",
1263		PermissionScopeSystem,
1264	}
1265	PermissionSysconsoleWriteUserManagementChannels = &Permission{
1266		"sysconsole_write_user_management_channels",
1267		"authentication.permissions.use_group_mentions.name",
1268		"authentication.permissions.use_group_mentions.description",
1269		PermissionScopeSystem,
1270	}
1271	PermissionSysconsoleReadUserManagementPermissions = &Permission{
1272		"sysconsole_read_user_management_permissions",
1273		"authentication.permissions.use_group_mentions.name",
1274		"authentication.permissions.use_group_mentions.description",
1275		PermissionScopeSystem,
1276	}
1277	PermissionSysconsoleWriteUserManagementPermissions = &Permission{
1278		"sysconsole_write_user_management_permissions",
1279		"authentication.permissions.use_group_mentions.name",
1280		"authentication.permissions.use_group_mentions.description",
1281		PermissionScopeSystem,
1282	}
1283	PermissionSysconsoleReadUserManagementSystemRoles = &Permission{
1284		"sysconsole_read_user_management_system_roles",
1285		"authentication.permissions.use_group_mentions.name",
1286		"authentication.permissions.use_group_mentions.description",
1287		PermissionScopeSystem,
1288	}
1289	PermissionSysconsoleWriteUserManagementSystemRoles = &Permission{
1290		"sysconsole_write_user_management_system_roles",
1291		"authentication.permissions.use_group_mentions.name",
1292		"authentication.permissions.use_group_mentions.description",
1293		PermissionScopeSystem,
1294	}
1295	// DEPRECATED
1296	PermissionSysconsoleReadEnvironment = &Permission{
1297		"sysconsole_read_environment",
1298		"authentication.permissions.use_group_mentions.name",
1299		"authentication.permissions.use_group_mentions.description",
1300		PermissionScopeSystem,
1301	}
1302	// DEPRECATED
1303	PermissionSysconsoleWriteEnvironment = &Permission{
1304		"sysconsole_write_environment",
1305		"authentication.permissions.use_group_mentions.name",
1306		"authentication.permissions.use_group_mentions.description",
1307		PermissionScopeSystem,
1308	}
1309	PermissionSysconsoleReadEnvironmentWebServer = &Permission{
1310		"sysconsole_read_environment_web_server",
1311		"",
1312		"",
1313		PermissionScopeSystem,
1314	}
1315	PermissionSysconsoleWriteEnvironmentWebServer = &Permission{
1316		"sysconsole_write_environment_web_server",
1317		"",
1318		"",
1319		PermissionScopeSystem,
1320	}
1321	PermissionSysconsoleReadEnvironmentDatabase = &Permission{
1322		"sysconsole_read_environment_database",
1323		"",
1324		"",
1325		PermissionScopeSystem,
1326	}
1327	PermissionSysconsoleWriteEnvironmentDatabase = &Permission{
1328		"sysconsole_write_environment_database",
1329		"",
1330		"",
1331		PermissionScopeSystem,
1332	}
1333	PermissionSysconsoleReadEnvironmentElasticsearch = &Permission{
1334		"sysconsole_read_environment_elasticsearch",
1335		"",
1336		"",
1337		PermissionScopeSystem,
1338	}
1339	PermissionSysconsoleWriteEnvironmentElasticsearch = &Permission{
1340		"sysconsole_write_environment_elasticsearch",
1341		"",
1342		"",
1343		PermissionScopeSystem,
1344	}
1345	PermissionSysconsoleReadEnvironmentFileStorage = &Permission{
1346		"sysconsole_read_environment_file_storage",
1347		"",
1348		"",
1349		PermissionScopeSystem,
1350	}
1351	PermissionSysconsoleWriteEnvironmentFileStorage = &Permission{
1352		"sysconsole_write_environment_file_storage",
1353		"",
1354		"",
1355		PermissionScopeSystem,
1356	}
1357	PermissionSysconsoleReadEnvironmentImageProxy = &Permission{
1358		"sysconsole_read_environment_image_proxy",
1359		"",
1360		"",
1361		PermissionScopeSystem,
1362	}
1363	PermissionSysconsoleWriteEnvironmentImageProxy = &Permission{
1364		"sysconsole_write_environment_image_proxy",
1365		"",
1366		"",
1367		PermissionScopeSystem,
1368	}
1369	PermissionSysconsoleReadEnvironmentSMTP = &Permission{
1370		"sysconsole_read_environment_smtp",
1371		"",
1372		"",
1373		PermissionScopeSystem,
1374	}
1375	PermissionSysconsoleWriteEnvironmentSMTP = &Permission{
1376		"sysconsole_write_environment_smtp",
1377		"",
1378		"",
1379		PermissionScopeSystem,
1380	}
1381	PermissionSysconsoleReadEnvironmentPushNotificationServer = &Permission{
1382		"sysconsole_read_environment_push_notification_server",
1383		"",
1384		"",
1385		PermissionScopeSystem,
1386	}
1387	PermissionSysconsoleWriteEnvironmentPushNotificationServer = &Permission{
1388		"sysconsole_write_environment_push_notification_server",
1389		"",
1390		"",
1391		PermissionScopeSystem,
1392	}
1393	PermissionSysconsoleReadEnvironmentHighAvailability = &Permission{
1394		"sysconsole_read_environment_high_availability",
1395		"",
1396		"",
1397		PermissionScopeSystem,
1398	}
1399	PermissionSysconsoleWriteEnvironmentHighAvailability = &Permission{
1400		"sysconsole_write_environment_high_availability",
1401		"",
1402		"",
1403		PermissionScopeSystem,
1404	}
1405	PermissionSysconsoleReadEnvironmentRateLimiting = &Permission{
1406		"sysconsole_read_environment_rate_limiting",
1407		"",
1408		"",
1409		PermissionScopeSystem,
1410	}
1411	PermissionSysconsoleWriteEnvironmentRateLimiting = &Permission{
1412		"sysconsole_write_environment_rate_limiting",
1413		"",
1414		"",
1415		PermissionScopeSystem,
1416	}
1417	PermissionSysconsoleReadEnvironmentLogging = &Permission{
1418		"sysconsole_read_environment_logging",
1419		"",
1420		"",
1421		PermissionScopeSystem,
1422	}
1423	PermissionSysconsoleWriteEnvironmentLogging = &Permission{
1424		"sysconsole_write_environment_logging",
1425		"",
1426		"",
1427		PermissionScopeSystem,
1428	}
1429	PermissionSysconsoleReadEnvironmentSessionLengths = &Permission{
1430		"sysconsole_read_environment_session_lengths",
1431		"",
1432		"",
1433		PermissionScopeSystem,
1434	}
1435	PermissionSysconsoleWriteEnvironmentSessionLengths = &Permission{
1436		"sysconsole_write_environment_session_lengths",
1437		"",
1438		"",
1439		PermissionScopeSystem,
1440	}
1441	PermissionSysconsoleReadEnvironmentPerformanceMonitoring = &Permission{
1442		"sysconsole_read_environment_performance_monitoring",
1443		"",
1444		"",
1445		PermissionScopeSystem,
1446	}
1447	PermissionSysconsoleWriteEnvironmentPerformanceMonitoring = &Permission{
1448		"sysconsole_write_environment_performance_monitoring",
1449		"",
1450		"",
1451		PermissionScopeSystem,
1452	}
1453	PermissionSysconsoleReadEnvironmentDeveloper = &Permission{
1454		"sysconsole_read_environment_developer",
1455		"",
1456		"",
1457		PermissionScopeSystem,
1458	}
1459	PermissionSysconsoleWriteEnvironmentDeveloper = &Permission{
1460		"sysconsole_write_environment_developer",
1461		"",
1462		"",
1463		PermissionScopeSystem,
1464	}
1465	// DEPRECATED
1466	PermissionSysconsoleReadSite = &Permission{
1467		"sysconsole_read_site",
1468		"authentication.permissions.use_group_mentions.name",
1469		"authentication.permissions.use_group_mentions.description",
1470		PermissionScopeSystem,
1471	}
1472	// DEPRECATED
1473	PermissionSysconsoleWriteSite = &Permission{
1474		"sysconsole_write_site",
1475		"authentication.permissions.use_group_mentions.name",
1476		"authentication.permissions.use_group_mentions.description",
1477		PermissionScopeSystem,
1478	}
1479
1480	PermissionSysconsoleReadSiteCustomization = &Permission{
1481		"sysconsole_read_site_customization",
1482		"",
1483		"",
1484		PermissionScopeSystem,
1485	}
1486	PermissionSysconsoleWriteSiteCustomization = &Permission{
1487		"sysconsole_write_site_customization",
1488		"",
1489		"",
1490		PermissionScopeSystem,
1491	}
1492	PermissionSysconsoleReadSiteLocalization = &Permission{
1493		"sysconsole_read_site_localization",
1494		"",
1495		"",
1496		PermissionScopeSystem,
1497	}
1498	PermissionSysconsoleWriteSiteLocalization = &Permission{
1499		"sysconsole_write_site_localization",
1500		"",
1501		"",
1502		PermissionScopeSystem,
1503	}
1504	PermissionSysconsoleReadSiteUsersAndTeams = &Permission{
1505		"sysconsole_read_site_users_and_teams",
1506		"",
1507		"",
1508		PermissionScopeSystem,
1509	}
1510	PermissionSysconsoleWriteSiteUsersAndTeams = &Permission{
1511		"sysconsole_write_site_users_and_teams",
1512		"",
1513		"",
1514		PermissionScopeSystem,
1515	}
1516	PermissionSysconsoleReadSiteNotifications = &Permission{
1517		"sysconsole_read_site_notifications",
1518		"",
1519		"",
1520		PermissionScopeSystem,
1521	}
1522	PermissionSysconsoleWriteSiteNotifications = &Permission{
1523		"sysconsole_write_site_notifications",
1524		"",
1525		"",
1526		PermissionScopeSystem,
1527	}
1528	PermissionSysconsoleReadSiteAnnouncementBanner = &Permission{
1529		"sysconsole_read_site_announcement_banner",
1530		"",
1531		"",
1532		PermissionScopeSystem,
1533	}
1534	PermissionSysconsoleWriteSiteAnnouncementBanner = &Permission{
1535		"sysconsole_write_site_announcement_banner",
1536		"",
1537		"",
1538		PermissionScopeSystem,
1539	}
1540	PermissionSysconsoleReadSiteEmoji = &Permission{
1541		"sysconsole_read_site_emoji",
1542		"",
1543		"",
1544		PermissionScopeSystem,
1545	}
1546	PermissionSysconsoleWriteSiteEmoji = &Permission{
1547		"sysconsole_write_site_emoji",
1548		"",
1549		"",
1550		PermissionScopeSystem,
1551	}
1552	PermissionSysconsoleReadSitePosts = &Permission{
1553		"sysconsole_read_site_posts",
1554		"",
1555		"",
1556		PermissionScopeSystem,
1557	}
1558	PermissionSysconsoleWriteSitePosts = &Permission{
1559		"sysconsole_write_site_posts",
1560		"",
1561		"",
1562		PermissionScopeSystem,
1563	}
1564	PermissionSysconsoleReadSiteFileSharingAndDownloads = &Permission{
1565		"sysconsole_read_site_file_sharing_and_downloads",
1566		"",
1567		"",
1568		PermissionScopeSystem,
1569	}
1570	PermissionSysconsoleWriteSiteFileSharingAndDownloads = &Permission{
1571		"sysconsole_write_site_file_sharing_and_downloads",
1572		"",
1573		"",
1574		PermissionScopeSystem,
1575	}
1576	PermissionSysconsoleReadSitePublicLinks = &Permission{
1577		"sysconsole_read_site_public_links",
1578		"",
1579		"",
1580		PermissionScopeSystem,
1581	}
1582	PermissionSysconsoleWriteSitePublicLinks = &Permission{
1583		"sysconsole_write_site_public_links",
1584		"",
1585		"",
1586		PermissionScopeSystem,
1587	}
1588	PermissionSysconsoleReadSiteNotices = &Permission{
1589		"sysconsole_read_site_notices",
1590		"",
1591		"",
1592		PermissionScopeSystem,
1593	}
1594	PermissionSysconsoleWriteSiteNotices = &Permission{
1595		"sysconsole_write_site_notices",
1596		"",
1597		"",
1598		PermissionScopeSystem,
1599	}
1600
1601	// Deprecated
1602	PermissionSysconsoleReadAuthentication = &Permission{
1603		"sysconsole_read_authentication",
1604		"authentication.permissions.use_group_mentions.name",
1605		"authentication.permissions.use_group_mentions.description",
1606		PermissionScopeSystem,
1607	}
1608	// Deprecated
1609	PermissionSysconsoleWriteAuthentication = &Permission{
1610		"sysconsole_write_authentication",
1611		"authentication.permissions.use_group_mentions.name",
1612		"authentication.permissions.use_group_mentions.description",
1613		PermissionScopeSystem,
1614	}
1615	PermissionSysconsoleReadAuthenticationSignup = &Permission{
1616		"sysconsole_read_authentication_signup",
1617		"",
1618		"",
1619		PermissionScopeSystem,
1620	}
1621	PermissionSysconsoleWriteAuthenticationSignup = &Permission{
1622		"sysconsole_write_authentication_signup",
1623		"",
1624		"",
1625		PermissionScopeSystem,
1626	}
1627	PermissionSysconsoleReadAuthenticationEmail = &Permission{
1628		"sysconsole_read_authentication_email",
1629		"",
1630		"",
1631		PermissionScopeSystem,
1632	}
1633	PermissionSysconsoleWriteAuthenticationEmail = &Permission{
1634		"sysconsole_write_authentication_email",
1635		"",
1636		"",
1637		PermissionScopeSystem,
1638	}
1639	PermissionSysconsoleReadAuthenticationPassword = &Permission{
1640		"sysconsole_read_authentication_password",
1641		"",
1642		"",
1643		PermissionScopeSystem,
1644	}
1645	PermissionSysconsoleWriteAuthenticationPassword = &Permission{
1646		"sysconsole_write_authentication_password",
1647		"",
1648		"",
1649		PermissionScopeSystem,
1650	}
1651	PermissionSysconsoleReadAuthenticationMfa = &Permission{
1652		"sysconsole_read_authentication_mfa",
1653		"",
1654		"",
1655		PermissionScopeSystem,
1656	}
1657	PermissionSysconsoleWriteAuthenticationMfa = &Permission{
1658		"sysconsole_write_authentication_mfa",
1659		"",
1660		"",
1661		PermissionScopeSystem,
1662	}
1663	PermissionSysconsoleReadAuthenticationLdap = &Permission{
1664		"sysconsole_read_authentication_ldap",
1665		"",
1666		"",
1667		PermissionScopeSystem,
1668	}
1669	PermissionSysconsoleWriteAuthenticationLdap = &Permission{
1670		"sysconsole_write_authentication_ldap",
1671		"",
1672		"",
1673		PermissionScopeSystem,
1674	}
1675	PermissionSysconsoleReadAuthenticationSaml = &Permission{
1676		"sysconsole_read_authentication_saml",
1677		"",
1678		"",
1679		PermissionScopeSystem,
1680	}
1681	PermissionSysconsoleWriteAuthenticationSaml = &Permission{
1682		"sysconsole_write_authentication_saml",
1683		"",
1684		"",
1685		PermissionScopeSystem,
1686	}
1687	PermissionSysconsoleReadAuthenticationOpenid = &Permission{
1688		"sysconsole_read_authentication_openid",
1689		"",
1690		"",
1691		PermissionScopeSystem,
1692	}
1693	PermissionSysconsoleWriteAuthenticationOpenid = &Permission{
1694		"sysconsole_write_authentication_openid",
1695		"",
1696		"",
1697		PermissionScopeSystem,
1698	}
1699	PermissionSysconsoleReadAuthenticationGuestAccess = &Permission{
1700		"sysconsole_read_authentication_guest_access",
1701		"",
1702		"",
1703		PermissionScopeSystem,
1704	}
1705	PermissionSysconsoleWriteAuthenticationGuestAccess = &Permission{
1706		"sysconsole_write_authentication_guest_access",
1707		"",
1708		"",
1709		PermissionScopeSystem,
1710	}
1711	PermissionSysconsoleReadPlugins = &Permission{
1712		"sysconsole_read_plugins",
1713		"authentication.permissions.use_group_mentions.name",
1714		"authentication.permissions.use_group_mentions.description",
1715		PermissionScopeSystem,
1716	}
1717	PermissionSysconsoleWritePlugins = &Permission{
1718		"sysconsole_write_plugins",
1719		"authentication.permissions.use_group_mentions.name",
1720		"authentication.permissions.use_group_mentions.description",
1721		PermissionScopeSystem,
1722	}
1723	// DEPRECATED
1724	PermissionSysconsoleReadIntegrations = &Permission{
1725		"sysconsole_read_integrations",
1726		"authentication.permissions.use_group_mentions.name",
1727		"authentication.permissions.use_group_mentions.description",
1728		PermissionScopeSystem,
1729	}
1730	// DEPRECATED
1731	PermissionSysconsoleWriteIntegrations = &Permission{
1732		"sysconsole_write_integrations",
1733		"authentication.permissions.use_group_mentions.name",
1734		"authentication.permissions.use_group_mentions.description",
1735		PermissionScopeSystem,
1736	}
1737	PermissionSysconsoleReadIntegrationsIntegrationManagement = &Permission{
1738		"sysconsole_read_integrations_integration_management",
1739		"",
1740		"",
1741		PermissionScopeSystem,
1742	}
1743	PermissionSysconsoleWriteIntegrationsIntegrationManagement = &Permission{
1744		"sysconsole_write_integrations_integration_management",
1745		"",
1746		"",
1747		PermissionScopeSystem,
1748	}
1749	PermissionSysconsoleReadIntegrationsBotAccounts = &Permission{
1750		"sysconsole_read_integrations_bot_accounts",
1751		"",
1752		"",
1753		PermissionScopeSystem,
1754	}
1755	PermissionSysconsoleWriteIntegrationsBotAccounts = &Permission{
1756		"sysconsole_write_integrations_bot_accounts",
1757		"",
1758		"",
1759		PermissionScopeSystem,
1760	}
1761	PermissionSysconsoleReadIntegrationsGif = &Permission{
1762		"sysconsole_read_integrations_gif",
1763		"",
1764		"",
1765		PermissionScopeSystem,
1766	}
1767	PermissionSysconsoleWriteIntegrationsGif = &Permission{
1768		"sysconsole_write_integrations_gif",
1769		"",
1770		"",
1771		PermissionScopeSystem,
1772	}
1773	PermissionSysconsoleReadIntegrationsCors = &Permission{
1774		"sysconsole_read_integrations_cors",
1775		"",
1776		"",
1777		PermissionScopeSystem,
1778	}
1779	PermissionSysconsoleWriteIntegrationsCors = &Permission{
1780		"sysconsole_write_integrations_cors",
1781		"",
1782		"",
1783		PermissionScopeSystem,
1784	}
1785	// DEPRECATED
1786	PermissionSysconsoleReadCompliance = &Permission{
1787		"sysconsole_read_compliance",
1788		"authentication.permissions.use_group_mentions.name",
1789		"authentication.permissions.use_group_mentions.description",
1790		PermissionScopeSystem,
1791	}
1792	// DEPRECATED
1793	PermissionSysconsoleWriteCompliance = &Permission{
1794		"sysconsole_write_compliance",
1795		"authentication.permissions.use_group_mentions.name",
1796		"authentication.permissions.use_group_mentions.description",
1797		PermissionScopeSystem,
1798	}
1799	PermissionSysconsoleReadComplianceDataRetentionPolicy = &Permission{
1800		"sysconsole_read_compliance_data_retention_policy",
1801		"",
1802		"",
1803		PermissionScopeSystem,
1804	}
1805	PermissionSysconsoleWriteComplianceDataRetentionPolicy = &Permission{
1806		"sysconsole_write_compliance_data_retention_policy",
1807		"",
1808		"",
1809		PermissionScopeSystem,
1810	}
1811	PermissionSysconsoleReadComplianceComplianceExport = &Permission{
1812		"sysconsole_read_compliance_compliance_export",
1813		"",
1814		"",
1815		PermissionScopeSystem,
1816	}
1817	PermissionSysconsoleWriteComplianceComplianceExport = &Permission{
1818		"sysconsole_write_compliance_compliance_export",
1819		"",
1820		"",
1821		PermissionScopeSystem,
1822	}
1823	PermissionSysconsoleReadComplianceComplianceMonitoring = &Permission{
1824		"sysconsole_read_compliance_compliance_monitoring",
1825		"",
1826		"",
1827		PermissionScopeSystem,
1828	}
1829	PermissionSysconsoleWriteComplianceComplianceMonitoring = &Permission{
1830		"sysconsole_write_compliance_compliance_monitoring",
1831		"",
1832		"",
1833		PermissionScopeSystem,
1834	}
1835	PermissionSysconsoleReadComplianceCustomTermsOfService = &Permission{
1836		"sysconsole_read_compliance_custom_terms_of_service",
1837		"",
1838		"",
1839		PermissionScopeSystem,
1840	}
1841	PermissionSysconsoleWriteComplianceCustomTermsOfService = &Permission{
1842		"sysconsole_write_compliance_custom_terms_of_service",
1843		"",
1844		"",
1845		PermissionScopeSystem,
1846	}
1847	// DEPRECATED
1848	PermissionSysconsoleReadExperimental = &Permission{
1849		"sysconsole_read_experimental",
1850		"authentication.permissions.use_group_mentions.name",
1851		"authentication.permissions.use_group_mentions.description",
1852		PermissionScopeSystem,
1853	}
1854	// DEPRECATED
1855	PermissionSysconsoleWriteExperimental = &Permission{
1856		"sysconsole_write_experimental",
1857		"authentication.permissions.use_group_mentions.name",
1858		"authentication.permissions.use_group_mentions.description",
1859		PermissionScopeSystem,
1860	}
1861	PermissionSysconsoleReadExperimentalFeatures = &Permission{
1862		"sysconsole_read_experimental_features",
1863		"",
1864		"",
1865		PermissionScopeSystem,
1866	}
1867	PermissionSysconsoleWriteExperimentalFeatures = &Permission{
1868		"sysconsole_write_experimental_features",
1869		"",
1870		"",
1871		PermissionScopeSystem,
1872	}
1873	PermissionSysconsoleReadExperimentalFeatureFlags = &Permission{
1874		"sysconsole_read_experimental_feature_flags",
1875		"",
1876		"",
1877		PermissionScopeSystem,
1878	}
1879	PermissionSysconsoleWriteExperimentalFeatureFlags = &Permission{
1880		"sysconsole_write_experimental_feature_flags",
1881		"",
1882		"",
1883		PermissionScopeSystem,
1884	}
1885	PermissionSysconsoleReadExperimentalBleve = &Permission{
1886		"sysconsole_read_experimental_bleve",
1887		"",
1888		"",
1889		PermissionScopeSystem,
1890	}
1891	PermissionSysconsoleWriteExperimentalBleve = &Permission{
1892		"sysconsole_write_experimental_bleve",
1893		"",
1894		"",
1895		PermissionScopeSystem,
1896	}
1897
1898	SysconsoleReadPermissions = []*Permission{
1899		PermissionSysconsoleReadAboutEditionAndLicense,
1900		PermissionSysconsoleReadBilling,
1901		PermissionSysconsoleReadReportingSiteStatistics,
1902		PermissionSysconsoleReadReportingTeamStatistics,
1903		PermissionSysconsoleReadReportingServerLogs,
1904		PermissionSysconsoleReadUserManagementUsers,
1905		PermissionSysconsoleReadUserManagementGroups,
1906		PermissionSysconsoleReadUserManagementTeams,
1907		PermissionSysconsoleReadUserManagementChannels,
1908		PermissionSysconsoleReadUserManagementPermissions,
1909		PermissionSysconsoleReadUserManagementSystemRoles,
1910		PermissionSysconsoleReadEnvironmentWebServer,
1911		PermissionSysconsoleReadEnvironmentDatabase,
1912		PermissionSysconsoleReadEnvironmentElasticsearch,
1913		PermissionSysconsoleReadEnvironmentFileStorage,
1914		PermissionSysconsoleReadEnvironmentImageProxy,
1915		PermissionSysconsoleReadEnvironmentSMTP,
1916		PermissionSysconsoleReadEnvironmentPushNotificationServer,
1917		PermissionSysconsoleReadEnvironmentHighAvailability,
1918		PermissionSysconsoleReadEnvironmentRateLimiting,
1919		PermissionSysconsoleReadEnvironmentLogging,
1920		PermissionSysconsoleReadEnvironmentSessionLengths,
1921		PermissionSysconsoleReadEnvironmentPerformanceMonitoring,
1922		PermissionSysconsoleReadEnvironmentDeveloper,
1923		PermissionSysconsoleReadSiteCustomization,
1924		PermissionSysconsoleReadSiteLocalization,
1925		PermissionSysconsoleReadSiteUsersAndTeams,
1926		PermissionSysconsoleReadSiteNotifications,
1927		PermissionSysconsoleReadSiteAnnouncementBanner,
1928		PermissionSysconsoleReadSiteEmoji,
1929		PermissionSysconsoleReadSitePosts,
1930		PermissionSysconsoleReadSiteFileSharingAndDownloads,
1931		PermissionSysconsoleReadSitePublicLinks,
1932		PermissionSysconsoleReadSiteNotices,
1933		PermissionSysconsoleReadAuthenticationSignup,
1934		PermissionSysconsoleReadAuthenticationEmail,
1935		PermissionSysconsoleReadAuthenticationPassword,
1936		PermissionSysconsoleReadAuthenticationMfa,
1937		PermissionSysconsoleReadAuthenticationLdap,
1938		PermissionSysconsoleReadAuthenticationSaml,
1939		PermissionSysconsoleReadAuthenticationOpenid,
1940		PermissionSysconsoleReadAuthenticationGuestAccess,
1941		PermissionSysconsoleReadPlugins,
1942		PermissionSysconsoleReadIntegrationsIntegrationManagement,
1943		PermissionSysconsoleReadIntegrationsBotAccounts,
1944		PermissionSysconsoleReadIntegrationsGif,
1945		PermissionSysconsoleReadIntegrationsCors,
1946		PermissionSysconsoleReadComplianceDataRetentionPolicy,
1947		PermissionSysconsoleReadComplianceComplianceExport,
1948		PermissionSysconsoleReadComplianceComplianceMonitoring,
1949		PermissionSysconsoleReadComplianceCustomTermsOfService,
1950		PermissionSysconsoleReadExperimentalFeatures,
1951		PermissionSysconsoleReadExperimentalFeatureFlags,
1952		PermissionSysconsoleReadExperimentalBleve,
1953	}
1954
1955	SysconsoleWritePermissions = []*Permission{
1956		PermissionSysconsoleWriteAboutEditionAndLicense,
1957		PermissionSysconsoleWriteBilling,
1958		PermissionSysconsoleWriteReportingSiteStatistics,
1959		PermissionSysconsoleWriteReportingTeamStatistics,
1960		PermissionSysconsoleWriteReportingServerLogs,
1961		PermissionSysconsoleWriteUserManagementUsers,
1962		PermissionSysconsoleWriteUserManagementGroups,
1963		PermissionSysconsoleWriteUserManagementTeams,
1964		PermissionSysconsoleWriteUserManagementChannels,
1965		PermissionSysconsoleWriteUserManagementPermissions,
1966		PermissionSysconsoleWriteUserManagementSystemRoles,
1967		PermissionSysconsoleWriteEnvironmentWebServer,
1968		PermissionSysconsoleWriteEnvironmentDatabase,
1969		PermissionSysconsoleWriteEnvironmentElasticsearch,
1970		PermissionSysconsoleWriteEnvironmentFileStorage,
1971		PermissionSysconsoleWriteEnvironmentImageProxy,
1972		PermissionSysconsoleWriteEnvironmentSMTP,
1973		PermissionSysconsoleWriteEnvironmentPushNotificationServer,
1974		PermissionSysconsoleWriteEnvironmentHighAvailability,
1975		PermissionSysconsoleWriteEnvironmentRateLimiting,
1976		PermissionSysconsoleWriteEnvironmentLogging,
1977		PermissionSysconsoleWriteEnvironmentSessionLengths,
1978		PermissionSysconsoleWriteEnvironmentPerformanceMonitoring,
1979		PermissionSysconsoleWriteEnvironmentDeveloper,
1980		PermissionSysconsoleWriteSiteCustomization,
1981		PermissionSysconsoleWriteSiteLocalization,
1982		PermissionSysconsoleWriteSiteUsersAndTeams,
1983		PermissionSysconsoleWriteSiteNotifications,
1984		PermissionSysconsoleWriteSiteAnnouncementBanner,
1985		PermissionSysconsoleWriteSiteEmoji,
1986		PermissionSysconsoleWriteSitePosts,
1987		PermissionSysconsoleWriteSiteFileSharingAndDownloads,
1988		PermissionSysconsoleWriteSitePublicLinks,
1989		PermissionSysconsoleWriteSiteNotices,
1990		PermissionSysconsoleWriteAuthenticationSignup,
1991		PermissionSysconsoleWriteAuthenticationEmail,
1992		PermissionSysconsoleWriteAuthenticationPassword,
1993		PermissionSysconsoleWriteAuthenticationMfa,
1994		PermissionSysconsoleWriteAuthenticationLdap,
1995		PermissionSysconsoleWriteAuthenticationSaml,
1996		PermissionSysconsoleWriteAuthenticationOpenid,
1997		PermissionSysconsoleWriteAuthenticationGuestAccess,
1998		PermissionSysconsoleWritePlugins,
1999		PermissionSysconsoleWriteIntegrationsIntegrationManagement,
2000		PermissionSysconsoleWriteIntegrationsBotAccounts,
2001		PermissionSysconsoleWriteIntegrationsGif,
2002		PermissionSysconsoleWriteIntegrationsCors,
2003		PermissionSysconsoleWriteComplianceDataRetentionPolicy,
2004		PermissionSysconsoleWriteComplianceComplianceExport,
2005		PermissionSysconsoleWriteComplianceComplianceMonitoring,
2006		PermissionSysconsoleWriteComplianceCustomTermsOfService,
2007		PermissionSysconsoleWriteExperimentalFeatures,
2008		PermissionSysconsoleWriteExperimentalFeatureFlags,
2009		PermissionSysconsoleWriteExperimentalBleve,
2010	}
2011
2012	SystemScopedPermissionsMinusSysconsole := []*Permission{
2013		PermissionAssignSystemAdminRole,
2014		PermissionManageRoles,
2015		PermissionManageSystem,
2016		PermissionCreateDirectChannel,
2017		PermissionCreateGroupChannel,
2018		PermissionListPublicTeams,
2019		PermissionJoinPublicTeams,
2020		PermissionListPrivateTeams,
2021		PermissionJoinPrivateTeams,
2022		PermissionEditOtherUsers,
2023		PermissionReadOtherUsersTeams,
2024		PermissionGetPublicLink,
2025		PermissionManageOAuth,
2026		PermissionManageSystemWideOAuth,
2027		PermissionCreateTeam,
2028		PermissionListUsersWithoutTeam,
2029		PermissionCreateUserAccessToken,
2030		PermissionReadUserAccessToken,
2031		PermissionRevokeUserAccessToken,
2032		PermissionCreateBot,
2033		PermissionAssignBot,
2034		PermissionReadBots,
2035		PermissionReadOthersBots,
2036		PermissionManageBots,
2037		PermissionManageOthersBots,
2038		PermissionReadJobs,
2039		PermissionManageJobs,
2040		PermissionPromoteGuest,
2041		PermissionDemoteToGuest,
2042		PermissionEditBrand,
2043		PermissionManageSharedChannels,
2044		PermissionManageSecureConnections,
2045		PermissionDownloadComplianceExportResult,
2046		PermissionCreateDataRetentionJob,
2047		PermissionReadDataRetentionJob,
2048		PermissionCreateComplianceExportJob,
2049		PermissionReadComplianceExportJob,
2050		PermissionReadAudits,
2051		PermissionTestSiteURL,
2052		PermissionTestElasticsearch,
2053		PermissionTestS3,
2054		PermissionReloadConfig,
2055		PermissionInvalidateCaches,
2056		PermissionRecycleDatabaseConnections,
2057		PermissionPurgeElasticsearchIndexes,
2058		PermissionTestEmail,
2059		PermissionCreateElasticsearchPostIndexingJob,
2060		PermissionCreateElasticsearchPostAggregationJob,
2061		PermissionReadElasticsearchPostIndexingJob,
2062		PermissionReadElasticsearchPostAggregationJob,
2063		PermissionPurgeBleveIndexes,
2064		PermissionCreatePostBleveIndexesJob,
2065		PermissionCreateLdapSyncJob,
2066		PermissionReadLdapSyncJob,
2067		PermissionTestLdap,
2068		PermissionInvalidateEmailInvite,
2069		PermissionGetSamlMetadataFromIdp,
2070		PermissionAddSamlPublicCert,
2071		PermissionAddSamlPrivateCert,
2072		PermissionAddSamlIdpCert,
2073		PermissionRemoveSamlPublicCert,
2074		PermissionRemoveSamlPrivateCert,
2075		PermissionRemoveSamlIdpCert,
2076		PermissionGetSamlCertStatus,
2077		PermissionAddLdapPublicCert,
2078		PermissionAddLdapPrivateCert,
2079		PermissionRemoveLdapPublicCert,
2080		PermissionRemoveLdapPrivateCert,
2081		PermissionGetAnalytics,
2082		PermissionGetLogs,
2083		PermissionReadLicenseInformation,
2084		PermissionManageLicenseInformation,
2085	}
2086
2087	TeamScopedPermissions := []*Permission{
2088		PermissionInviteUser,
2089		PermissionAddUserToTeam,
2090		PermissionManageSlashCommands,
2091		PermissionManageOthersSlashCommands,
2092		PermissionCreatePublicChannel,
2093		PermissionCreatePrivateChannel,
2094		PermissionManageTeamRoles,
2095		PermissionListTeamChannels,
2096		PermissionJoinPublicChannels,
2097		PermissionReadPublicChannel,
2098		PermissionManageIncomingWebhooks,
2099		PermissionManageOutgoingWebhooks,
2100		PermissionManageOthersIncomingWebhooks,
2101		PermissionManageOthersOutgoingWebhooks,
2102		PermissionCreateEmojis,
2103		PermissionDeleteEmojis,
2104		PermissionDeleteOthersEmojis,
2105		PermissionRemoveUserFromTeam,
2106		PermissionManageTeam,
2107		PermissionImportTeam,
2108		PermissionViewTeam,
2109		PermissionViewMembers,
2110		PermissionInviteGuest,
2111	}
2112
2113	ChannelScopedPermissions := []*Permission{
2114		PermissionUseSlashCommands,
2115		PermissionManagePublicChannelMembers,
2116		PermissionManagePrivateChannelMembers,
2117		PermissionManageChannelRoles,
2118		PermissionManagePublicChannelProperties,
2119		PermissionManagePrivateChannelProperties,
2120		PermissionConvertPublicChannelToPrivate,
2121		PermissionConvertPrivateChannelToPublic,
2122		PermissionDeletePublicChannel,
2123		PermissionDeletePrivateChannel,
2124		PermissionReadChannel,
2125		PermissionReadPublicChannelGroups,
2126		PermissionReadPrivateChannelGroups,
2127		PermissionAddReaction,
2128		PermissionRemoveReaction,
2129		PermissionRemoveOthersReactions,
2130		PermissionUploadFile,
2131		PermissionCreatePost,
2132		PermissionCreatePostPublic,
2133		PermissionCreatePostEphemeral,
2134		PermissionEditPost,
2135		PermissionEditOthersPosts,
2136		PermissionDeletePost,
2137		PermissionDeleteOthersPosts,
2138		PermissionUseChannelMentions,
2139		PermissionUseGroupMentions,
2140	}
2141
2142	DeprecatedPermissions = []*Permission{
2143		PermissionPermanentDeleteUser,
2144		PermissionManageWebhooks,
2145		PermissionManageOthersWebhooks,
2146		PermissionManageEmojis,
2147		PermissionManageOthersEmojis,
2148		PermissionSysconsoleReadAuthentication,
2149		PermissionSysconsoleWriteAuthentication,
2150		PermissionSysconsoleReadSite,
2151		PermissionSysconsoleWriteSite,
2152		PermissionSysconsoleReadEnvironment,
2153		PermissionSysconsoleWriteEnvironment,
2154		PermissionSysconsoleReadReporting,
2155		PermissionSysconsoleWriteReporting,
2156		PermissionSysconsoleReadAbout,
2157		PermissionSysconsoleWriteAbout,
2158		PermissionSysconsoleReadExperimental,
2159		PermissionSysconsoleWriteExperimental,
2160		PermissionSysconsoleReadIntegrations,
2161		PermissionSysconsoleWriteIntegrations,
2162		PermissionSysconsoleReadCompliance,
2163		PermissionSysconsoleWriteCompliance,
2164	}
2165
2166	AllPermissions = []*Permission{}
2167	AllPermissions = append(AllPermissions, SystemScopedPermissionsMinusSysconsole...)
2168	AllPermissions = append(AllPermissions, TeamScopedPermissions...)
2169	AllPermissions = append(AllPermissions, ChannelScopedPermissions...)
2170	AllPermissions = append(AllPermissions, SysconsoleReadPermissions...)
2171	AllPermissions = append(AllPermissions, SysconsoleWritePermissions...)
2172
2173	ChannelModeratedPermissions = []string{
2174		PermissionCreatePost.Id,
2175		"create_reactions",
2176		"manage_members",
2177		PermissionUseChannelMentions.Id,
2178	}
2179
2180	ChannelModeratedPermissionsMap = map[string]string{
2181		PermissionCreatePost.Id:                  ChannelModeratedPermissions[0],
2182		PermissionAddReaction.Id:                 ChannelModeratedPermissions[1],
2183		PermissionRemoveReaction.Id:              ChannelModeratedPermissions[1],
2184		PermissionManagePublicChannelMembers.Id:  ChannelModeratedPermissions[2],
2185		PermissionManagePrivateChannelMembers.Id: ChannelModeratedPermissions[2],
2186		PermissionUseChannelMentions.Id:          ChannelModeratedPermissions[3],
2187	}
2188}
2189
2190func init() {
2191	initializePermissions()
2192}
2193