summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattermost/mattermost-server/v6/model/permission.go
blob: 9a3e4aae17caa39a6a820f0afa09c4d633962984 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

package model

const (
	PermissionScopeSystem   = "system_scope"
	PermissionScopeTeam     = "team_scope"
	PermissionScopeChannel  = "channel_scope"
	PermissionScopePlaybook = "playbook_scope"
	PermissionScopeRun      = "run_scope"
)

type Permission struct {
	Id          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	Scope       string `json:"scope"`
}

var PermissionInviteUser *Permission
var PermissionAddUserToTeam *Permission
var PermissionUseSlashCommands *Permission
var PermissionManageSlashCommands *Permission
var PermissionManageOthersSlashCommands *Permission
var PermissionCreatePublicChannel *Permission
var PermissionCreatePrivateChannel *Permission
var PermissionManagePublicChannelMembers *Permission
var PermissionManagePrivateChannelMembers *Permission
var PermissionConvertPublicChannelToPrivate *Permission
var PermissionConvertPrivateChannelToPublic *Permission
var PermissionAssignSystemAdminRole *Permission
var PermissionManageRoles *Permission
var PermissionManageTeamRoles *Permission
var PermissionManageChannelRoles *Permission
var PermissionCreateDirectChannel *Permission
var PermissionCreateGroupChannel *Permission
var PermissionManagePublicChannelProperties *Permission
var PermissionManagePrivateChannelProperties *Permission
var PermissionListPublicTeams *Permission
var PermissionJoinPublicTeams *Permission
var PermissionListPrivateTeams *Permission
var PermissionJoinPrivateTeams *Permission
var PermissionListTeamChannels *Permission
var PermissionJoinPublicChannels *Permission
var PermissionDeletePublicChannel *Permission
var PermissionDeletePrivateChannel *Permission
var PermissionEditOtherUsers *Permission
var PermissionReadChannel *Permission
var PermissionReadPublicChannelGroups *Permission
var PermissionReadPrivateChannelGroups *Permission
var PermissionReadPublicChannel *Permission
var PermissionAddReaction *Permission
var PermissionRemoveReaction *Permission
var PermissionRemoveOthersReactions *Permission
var PermissionPermanentDeleteUser *Permission
var PermissionUploadFile *Permission
var PermissionGetPublicLink *Permission
var PermissionManageWebhooks *Permission
var PermissionManageOthersWebhooks *Permission
var PermissionManageIncomingWebhooks *Permission
var PermissionManageOutgoingWebhooks *Permission
var PermissionManageOthersIncomingWebhooks *Permission
var PermissionManageOthersOutgoingWebhooks *Permission
var PermissionManageOAuth *Permission
var PermissionManageSystemWideOAuth *Permission
var PermissionManageEmojis *Permission
var PermissionManageOthersEmojis *Permission
var PermissionCreateEmojis *Permission
var PermissionDeleteEmojis *Permission
var PermissionDeleteOthersEmojis *Permission
var PermissionCreatePost *Permission
var PermissionCreatePostPublic *Permission
var PermissionCreatePostEphemeral *Permission
var PermissionEditPost *Permission
var PermissionEditOthersPosts *Permission
var PermissionDeletePost *Permission
var PermissionDeleteOthersPosts *Permission
var PermissionRemoveUserFromTeam *Permission
var PermissionCreateTeam *Permission
var PermissionManageTeam *Permission
var PermissionImportTeam *Permission
var PermissionViewTeam *Permission
var PermissionListUsersWithoutTeam *Permission
var PermissionReadJobs *Permission
var PermissionManageJobs *Permission
var PermissionCreateUserAccessToken *Permission
var PermissionReadUserAccessToken *Permission
var PermissionRevokeUserAccessToken *Permission
var PermissionCreateBot *Permission
var PermissionAssignBot *Permission
var PermissionReadBots *Permission
var PermissionReadOthersBots *Permission
var PermissionManageBots *Permission
var PermissionManageOthersBots *Permission
var PermissionViewMembers *Permission
var PermissionInviteGuest *Permission
var PermissionPromoteGuest *Permission
var PermissionDemoteToGuest *Permission
var PermissionUseChannelMentions *Permission
var PermissionUseGroupMentions *Permission
var PermissionReadOtherUsersTeams *Permission
var PermissionEditBrand *Permission
var PermissionManageSharedChannels *Permission
var PermissionManageSecureConnections *Permission
var PermissionDownloadComplianceExportResult *Permission
var PermissionCreateDataRetentionJob *Permission
var PermissionReadDataRetentionJob *Permission
var PermissionCreateComplianceExportJob *Permission
var PermissionReadComplianceExportJob *Permission
var PermissionReadAudits *Permission
var PermissionTestElasticsearch *Permission
var PermissionTestSiteURL *Permission
var PermissionTestS3 *Permission
var PermissionReloadConfig *Permission
var PermissionInvalidateCaches *Permission
var PermissionRecycleDatabaseConnections *Permission
var PermissionPurgeElasticsearchIndexes *Permission
var PermissionTestEmail *Permission
var PermissionCreateElasticsearchPostIndexingJob *Permission
var PermissionCreateElasticsearchPostAggregationJob *Permission
var PermissionReadElasticsearchPostIndexingJob *Permission
var PermissionReadElasticsearchPostAggregationJob *Permission
var PermissionPurgeBleveIndexes *Permission
var PermissionCreatePostBleveIndexesJob *Permission
var PermissionCreateLdapSyncJob *Permission
var PermissionReadLdapSyncJob *Permission
var PermissionTestLdap *Permission
var PermissionInvalidateEmailInvite *Permission
var PermissionGetSamlMetadataFromIdp *Permission
var PermissionAddSamlPublicCert *Permission
var PermissionAddSamlPrivateCert *Permission
var PermissionAddSamlIdpCert *Permission
var PermissionRemoveSamlPublicCert *Permission
var PermissionRemoveSamlPrivateCert *Permission
var PermissionRemoveSamlIdpCert *Permission
var PermissionGetSamlCertStatus *Permission
var PermissionAddLdapPublicCert *Permission
var PermissionAddLdapPrivateCert *Permission
var PermissionRemoveLdapPublicCert *Permission
var PermissionRemoveLdapPrivateCert *Permission
var PermissionGetLogs *Permission
var PermissionGetAnalytics *Permission
var PermissionReadLicenseInformation *Permission
var PermissionManageLicenseInformation *Permission

var PermissionSysconsoleReadAbout *Permission
var PermissionSysconsoleWriteAbout *Permission

var PermissionSysconsoleReadAboutEditionAndLicense *Permission
var PermissionSysconsoleWriteAboutEditionAndLicense *Permission

var PermissionSysconsoleReadBilling *Permission
var PermissionSysconsoleWriteBilling *Permission

var PermissionSysconsoleReadReporting *Permission
var PermissionSysconsoleWriteReporting *Permission

var PermissionSysconsoleReadReportingSiteStatistics *Permission
var PermissionSysconsoleWriteReportingSiteStatistics *Permission

var PermissionSysconsoleReadReportingTeamStatistics *Permission
var PermissionSysconsoleWriteReportingTeamStatistics *Permission

var PermissionSysconsoleReadReportingServerLogs *Permission
var PermissionSysconsoleWriteReportingServerLogs *Permission

var PermissionSysconsoleReadUserManagementUsers *Permission
var PermissionSysconsoleWriteUserManagementUsers *Permission

var PermissionSysconsoleReadUserManagementGroups *Permission
var PermissionSysconsoleWriteUserManagementGroups *Permission

var PermissionSysconsoleReadUserManagementTeams *Permission
var PermissionSysconsoleWriteUserManagementTeams *Permission

var PermissionSysconsoleReadUserManagementChannels *Permission
var PermissionSysconsoleWriteUserManagementChannels *Permission

var PermissionSysconsoleReadUserManagementPermissions *Permission
var PermissionSysconsoleWriteUserManagementPermissions *Permission

var PermissionSysconsoleReadUserManagementSystemRoles *Permission
var PermissionSysconsoleWriteUserManagementSystemRoles *Permission

// DEPRECATED
var PermissionSysconsoleReadEnvironment *Permission

// DEPRECATED
var PermissionSysconsoleWriteEnvironment *Permission

var PermissionSysconsoleReadEnvironmentWebServer *Permission
var PermissionSysconsoleWriteEnvironmentWebServer *Permission

var PermissionSysconsoleReadEnvironmentDatabase *Permission
var PermissionSysconsoleWriteEnvironmentDatabase *Permission

var PermissionSysconsoleReadEnvironmentElasticsearch *Permission
var PermissionSysconsoleWriteEnvironmentElasticsearch *Permission

var PermissionSysconsoleReadEnvironmentFileStorage *Permission
var PermissionSysconsoleWriteEnvironmentFileStorage *Permission

var PermissionSysconsoleReadEnvironmentImageProxy *Permission
var PermissionSysconsoleWriteEnvironmentImageProxy *Permission

var PermissionSysconsoleReadEnvironmentSMTP *Permission
var PermissionSysconsoleWriteEnvironmentSMTP *Permission

var PermissionSysconsoleReadEnvironmentPushNotificationServer *Permission
var PermissionSysconsoleWriteEnvironmentPushNotificationServer *Permission

var PermissionSysconsoleReadEnvironmentHighAvailability *Permission
var PermissionSysconsoleWriteEnvironmentHighAvailability *Permission

var PermissionSysconsoleReadEnvironmentRateLimiting *Permission
var PermissionSysconsoleWriteEnvironmentRateLimiting *Permission

var PermissionSysconsoleReadEnvironmentLogging *Permission
var PermissionSysconsoleWriteEnvironmentLogging *Permission

var PermissionSysconsoleReadEnvironmentSessionLengths *Permission
var PermissionSysconsoleWriteEnvironmentSessionLengths *Permission

var PermissionSysconsoleReadEnvironmentPerformanceMonitoring *Permission
var PermissionSysconsoleWriteEnvironmentPerformanceMonitoring *Permission

var PermissionSysconsoleReadEnvironmentDeveloper *Permission
var PermissionSysconsoleWriteEnvironmentDeveloper *Permission

var PermissionSysconsoleReadSite *Permission
var PermissionSysconsoleWriteSite *Permission

var PermissionSysconsoleReadSiteCustomization *Permission
var PermissionSysconsoleWriteSiteCustomization *Permission

var PermissionSysconsoleReadSiteLocalization *Permission
var PermissionSysconsoleWriteSiteLocalization *Permission

var PermissionSysconsoleReadSiteUsersAndTeams *Permission
var PermissionSysconsoleWriteSiteUsersAndTeams *Permission

var PermissionSysconsoleReadSiteNotifications *Permission
var PermissionSysconsoleWriteSiteNotifications *Permission

var PermissionSysconsoleReadSiteAnnouncementBanner *Permission
var PermissionSysconsoleWriteSiteAnnouncementBanner *Permission

var PermissionSysconsoleReadSiteEmoji *Permission
var PermissionSysconsoleWriteSiteEmoji *Permission

var PermissionSysconsoleReadSitePosts *Permission
var PermissionSysconsoleWriteSitePosts *Permission

var PermissionSysconsoleReadSiteFileSharingAndDownloads *Permission
var PermissionSysconsoleWriteSiteFileSharingAndDownloads *Permission

var PermissionSysconsoleReadSitePublicLinks *Permission
var PermissionSysconsoleWriteSitePublicLinks *Permission

var PermissionSysconsoleReadSiteNotices *Permission
var PermissionSysconsoleWriteSiteNotices *Permission

var PermissionSysconsoleReadAuthentication *Permission
var PermissionSysconsoleWriteAuthentication *Permission

var PermissionSysconsoleReadAuthenticationSignup *Permission
var PermissionSysconsoleWriteAuthenticationSignup *Permission

var PermissionSysconsoleReadAuthenticationEmail *Permission
var PermissionSysconsoleWriteAuthenticationEmail *Permission

var PermissionSysconsoleReadAuthenticationPassword *Permission
var PermissionSysconsoleWriteAuthenticationPassword *Permission

var PermissionSysconsoleReadAuthenticationMfa *Permission
var PermissionSysconsoleWriteAuthenticationMfa *Permission

var PermissionSysconsoleReadAuthenticationLdap *Permission
var PermissionSysconsoleWriteAuthenticationLdap *Permission

var PermissionSysconsoleReadAuthenticationSaml *Permission
var PermissionSysconsoleWriteAuthenticationSaml *Permission

var PermissionSysconsoleReadAuthenticationOpenid *Permission
var PermissionSysconsoleWriteAuthenticationOpenid *Permission

var PermissionSysconsoleReadAuthenticationGuestAccess *Permission
var PermissionSysconsoleWriteAuthenticationGuestAccess *Permission

var PermissionSysconsoleReadPlugins *Permission
var PermissionSysconsoleWritePlugins *Permission

var PermissionSysconsoleReadIntegrations *Permission
var PermissionSysconsoleWriteIntegrations *Permission

var PermissionSysconsoleReadIntegrationsIntegrationManagement *Permission
var PermissionSysconsoleWriteIntegrationsIntegrationManagement *Permission

var PermissionSysconsoleReadIntegrationsBotAccounts *Permission
var PermissionSysconsoleWriteIntegrationsBotAccounts *Permission

var PermissionSysconsoleReadIntegrationsGif *Permission
var PermissionSysconsoleWriteIntegrationsGif *Permission

var PermissionSysconsoleReadIntegrationsCors *Permission
var PermissionSysconsoleWriteIntegrationsCors *Permission

var PermissionSysconsoleReadCompliance *Permission
var PermissionSysconsoleWriteCompliance *Permission

var PermissionSysconsoleReadComplianceDataRetentionPolicy *Permission
var PermissionSysconsoleWriteComplianceDataRetentionPolicy *Permission

var PermissionSysconsoleReadComplianceComplianceExport *Permission
var PermissionSysconsoleWriteComplianceComplianceExport *Permission

var PermissionSysconsoleReadComplianceComplianceMonitoring *Permission
var PermissionSysconsoleWriteComplianceComplianceMonitoring *Permission

var PermissionSysconsoleReadComplianceCustomTermsOfService *Permission
var PermissionSysconsoleWriteComplianceCustomTermsOfService *Permission

var PermissionSysconsoleReadExperimental *Permission
var PermissionSysconsoleWriteExperimental *Permission

var PermissionSysconsoleReadExperimentalFeatures *Permission
var PermissionSysconsoleWriteExperimentalFeatures *Permission

var PermissionSysconsoleReadExperimentalFeatureFlags *Permission
var PermissionSysconsoleWriteExperimentalFeatureFlags *Permission

var PermissionSysconsoleReadExperimentalBleve *Permission
var PermissionSysconsoleWriteExperimentalBleve *Permission

var PermissionPublicPlaybookCreate *Permission
var PermissionPublicPlaybookManageProperties *Permission
var PermissionPublicPlaybookManageMembers *Permission
var PermissionPublicPlaybookView *Permission
var PermissionPublicPlaybookMakePrivate *Permission

var PermissionPrivatePlaybookCreate *Permission
var PermissionPrivatePlaybookManageProperties *Permission
var PermissionPrivatePlaybookManageMembers *Permission
var PermissionPrivatePlaybookView *Permission
var PermissionPrivatePlaybookMakePublic *Permission

var PermissionRunCreate *Permission
var PermissionRunManageProperties *Permission
var PermissionRunManageMembers *Permission
var PermissionRunView *Permission

// General permission that encompasses all system admin functions
// in the future this could be broken up to allow access to some
// admin functions but not others
var PermissionManageSystem *Permission

var AllPermissions []*Permission
var DeprecatedPermissions []*Permission

var ChannelModeratedPermissions []string
var ChannelModeratedPermissionsMap map[string]string

var SysconsoleReadPermissions []*Permission
var SysconsoleWritePermissions []*Permission

func initializePermissions() {
	PermissionInviteUser = &Permission{
		"invite_user",
		"authentication.permissions.team_invite_user.name",
		"authentication.permissions.team_invite_user.description",
		PermissionScopeTeam,
	}
	PermissionAddUserToTeam = &Permission{
		"add_user_to_team",
		"authentication.permissions.add_user_to_team.name",
		"authentication.permissions.add_user_to_team.description",
		PermissionScopeTeam,
	}
	PermissionUseSlashCommands = &Permission{
		"use_slash_commands",
		"authentication.permissions.team_use_slash_commands.name",
		"authentication.permissions.team_use_slash_commands.description",
		PermissionScopeChannel,
	}
	PermissionManageSlashCommands = &Permission{
		"manage_slash_commands",
		"authentication.permissions.manage_slash_commands.name",
		"authentication.permissions.manage_slash_commands.description",
		PermissionScopeTeam,
	}
	PermissionManageOthersSlashCommands = &Permission{
		"manage_others_slash_commands",
		"authentication.permissions.manage_others_slash_commands.name",
		"authentication.permissions.manage_others_slash_commands.description",
		PermissionScopeTeam,
	}
	PermissionCreatePublicChannel = &Permission{
		"create_public_channel",
		"authentication.permissions.create_public_channel.name",
		"authentication.permissions.create_public_channel.description",
		PermissionScopeTeam,
	}
	PermissionCreatePrivateChannel = &Permission{
		"create_private_channel",
		"authentication.permissions.create_private_channel.name",
		"authentication.permissions.create_private_channel.description",
		PermissionScopeTeam,
	}
	PermissionManagePublicChannelMembers = &Permission{
		"manage_public_channel_members",
		"authentication.permissions.manage_public_channel_members.name",
		"authentication.permissions.manage_public_channel_members.description",
		PermissionScopeChannel,
	}
	PermissionManagePrivateChannelMembers = &Permission{
		"manage_private_channel_members",
		"authentication.permissions.manage_private_channel_members.name",
		"authentication.permissions.manage_private_channel_members.description",
		PermissionScopeChannel,
	}
	PermissionConvertPublicChannelToPrivate = &Permission{
		"convert_public_channel_to_private",
		"authentication.permissions.convert_public_channel_to_private.name",
		"authentication.permissions.convert_public_channel_to_private.description",
		PermissionScopeChannel,
	}
	PermissionConvertPrivateChannelToPublic = &Permission{
		"convert_private_channel_to_public",
		"authentication.permissions.convert_private_channel_to_public.name",
		"authentication.permissions.convert_private_channel_to_public.description",
		PermissionScopeChannel,
	}
	PermissionAssignSystemAdminRole = &Permission{
		"assign_system_admin_role",
		"authentication.permissions.assign_system_admin_role.name",
		"authentication.permissions.assign_system_admin_role.description",
		PermissionScopeSystem,
	}
	PermissionManageRoles = &Permission{
		"manage_roles",
		"authentication.permissions.manage_roles.name",
		"authentication.permissions.manage_roles.description",
		PermissionScopeSystem,
	}
	PermissionManageTeamRoles = &Permission{
		"manage_team_roles",
		"authentication.permissions.manage_team_roles.name",
		"authentication.permissions.manage_team_roles.description",
		PermissionScopeTeam,
	}
	PermissionManageChannelRoles = &Permission{
		"manage_channel_roles",
		"authentication.permissions.manage_channel_roles.name",
		"authentication.permissions.manage_channel_roles.description",
		PermissionScopeChannel,
	}
	PermissionManageSystem = &Permission{
		"manage_system",
		"authentication.permissions.manage_system.name",
		"authentication.permissions.manage_system.description",
		PermissionScopeSystem,
	}
	PermissionCreateDirectChannel = &Permission{
		"create_direct_channel",
		"authentication.permissions.create_direct_channel.name",
		"authentication.permissions.create_direct_channel.description",
		PermissionScopeSystem,
	}
	PermissionCreateGroupChannel = &Permission{
		"create_group_channel",
		"authentication.permissions.create_group_channel.name",
		"authentication.permissions.create_group_channel.description",
		PermissionScopeSystem,
	}
	PermissionManagePublicChannelProperties = &Permission{
		"manage_public_channel_properties",
		"authentication.permissions.manage_public_channel_properties.name",
		"authentication.permissions.manage_public_channel_properties.description",
		PermissionScopeChannel,
	}
	PermissionManagePrivateChannelProperties = &Permission{
		"manage_private_channel_properties",
		"authentication.permissions.manage_private_channel_properties.name",
		"authentication.permissions.manage_private_channel_properties.description",
		PermissionScopeChannel,
	}
	PermissionListPublicTeams = &Permission{
		"list_public_teams",
		"authentication.permissions.list_public_teams.name",
		"authentication.permissions.list_public_teams.description",
		PermissionScopeSystem,
	}
	PermissionJoinPublicTeams = &Permission{
		"join_public_teams",
		"authentication.permissions.join_public_teams.name",
		"authentication.permissions.join_public_teams.description",
		PermissionScopeSystem,
	}
	PermissionListPrivateTeams = &Permission{
		"list_private_teams",
		"authentication.permissions.list_private_teams.name",
		"authentication.permissions.list_private_teams.description",
		PermissionScopeSystem,
	}
	PermissionJoinPrivateTeams = &Permission{
		"join_private_teams",
		"authentication.permissions.join_private_teams.name",
		"authentication.permissions.join_private_teams.description",
		PermissionScopeSystem,
	}
	PermissionListTeamChannels = &Permission{
		"list_team_channels",
		"authentication.permissions.list_team_channels.name",
		"authentication.permissions.list_team_channels.description",
		PermissionScopeTeam,
	}
	PermissionJoinPublicChannels = &Permission{
		"join_public_channels",
		"authentication.permissions.join_public_channels.name",
		"authentication.permissions.join_public_channels.description",
		PermissionScopeTeam,
	}
	PermissionDeletePublicChannel = &Permission{
		"delete_public_channel",
		"authentication.permissions.delete_public_channel.name",
		"authentication.permissions.delete_public_channel.description",
		PermissionScopeChannel,
	}
	PermissionDeletePrivateChannel = &Permission{
		"delete_private_channel",
		"authentication.permissions.delete_private_channel.name",
		"authentication.permissions.delete_private_channel.description",
		PermissionScopeChannel,
	}
	PermissionEditOtherUsers = &Permission{
		"edit_other_users",
		"authentication.permissions.edit_other_users.name",
		"authentication.permissions.edit_other_users.description",
		PermissionScopeSystem,
	}
	PermissionReadChannel = &Permission{
		"read_channel",
		"authentication.permissions.read_channel.name",
		"authentication.permissions.read_channel.description",
		PermissionScopeChannel,
	}
	PermissionReadPublicChannelGroups = &Permission{
		"read_public_channel_groups",
		"authentication.permissions.read_public_channel_groups.name",
		"authentication.permissions.read_public_channel_groups.description",
		PermissionScopeChannel,
	}
	PermissionReadPrivateChannelGroups = &Permission{
		"read_private_channel_groups",
		"authentication.permissions.read_private_channel_groups.name",
		"authentication.permissions.read_private_channel_groups.description",
		PermissionScopeChannel,
	}
	PermissionReadPublicChannel = &Permission{
		"read_public_channel",
		"authentication.permissions.read_public_channel.name",
		"authentication.permissions.read_public_channel.description",
		PermissionScopeTeam,
	}
	PermissionAddReaction = &Permission{
		"add_reaction",
		"authentication.permissions.add_reaction.name",
		"authentication.permissions.add_reaction.description",
		PermissionScopeChannel,
	}
	PermissionRemoveReaction = &Permission{
		"remove_reaction",
		"authentication.permissions.remove_reaction.name",
		"authentication.permissions.remove_reaction.description",
		PermissionScopeChannel,
	}
	PermissionRemoveOthersReactions = &Permission{
		"remove_others_reactions",
		"authentication.permissions.remove_others_reactions.name",
		"authentication.permissions.remove_others_reactions.description",
		PermissionScopeChannel,
	}
	// DEPRECATED
	PermissionPermanentDeleteUser = &Permission{
		"permanent_delete_user",
		"authentication.permissions.permanent_delete_user.name",
		"authentication.permissions.permanent_delete_user.description",
		PermissionScopeSystem,
	}
	PermissionUploadFile = &Permission{
		"upload_file",
		"authentication.permissions.upload_file.name",
		"authentication.permissions.upload_file.description",
		PermissionScopeChannel,
	}
	PermissionGetPublicLink = &Permission{
		"get_public_link",
		"authentication.permissions.get_public_link.name",
		"authentication.permissions.get_public_link.description",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionManageWebhooks = &Permission{
		"manage_webhooks",
		"authentication.permissions.manage_webhooks.name",
		"authentication.permissions.manage_webhooks.description",
		PermissionScopeTeam,
	}
	// DEPRECATED
	PermissionManageOthersWebhooks = &Permission{
		"manage_others_webhooks",
		"authentication.permissions.manage_others_webhooks.name",
		"authentication.permissions.manage_others_webhooks.description",
		PermissionScopeTeam,
	}
	PermissionManageIncomingWebhooks = &Permission{
		"manage_incoming_webhooks",
		"authentication.permissions.manage_incoming_webhooks.name",
		"authentication.permissions.manage_incoming_webhooks.description",
		PermissionScopeTeam,
	}
	PermissionManageOutgoingWebhooks = &Permission{
		"manage_outgoing_webhooks",
		"authentication.permissions.manage_outgoing_webhooks.name",
		"authentication.permissions.manage_outgoing_webhooks.description",
		PermissionScopeTeam,
	}
	PermissionManageOthersIncomingWebhooks = &Permission{
		"manage_others_incoming_webhooks",
		"authentication.permissions.manage_others_incoming_webhooks.name",
		"authentication.permissions.manage_others_incoming_webhooks.description",
		PermissionScopeTeam,
	}
	PermissionManageOthersOutgoingWebhooks = &Permission{
		"manage_others_outgoing_webhooks",
		"authentication.permissions.manage_others_outgoing_webhooks.name",
		"authentication.permissions.manage_others_outgoing_webhooks.description",
		PermissionScopeTeam,
	}
	PermissionManageOAuth = &Permission{
		"manage_oauth",
		"authentication.permissions.manage_oauth.name",
		"authentication.permissions.manage_oauth.description",
		PermissionScopeSystem,
	}
	PermissionManageSystemWideOAuth = &Permission{
		"manage_system_wide_oauth",
		"authentication.permissions.manage_system_wide_oauth.name",
		"authentication.permissions.manage_system_wide_oauth.description",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionManageEmojis = &Permission{
		"manage_emojis",
		"authentication.permissions.manage_emojis.name",
		"authentication.permissions.manage_emojis.description",
		PermissionScopeTeam,
	}
	// DEPRECATED
	PermissionManageOthersEmojis = &Permission{
		"manage_others_emojis",
		"authentication.permissions.manage_others_emojis.name",
		"authentication.permissions.manage_others_emojis.description",
		PermissionScopeTeam,
	}
	PermissionCreateEmojis = &Permission{
		"create_emojis",
		"authentication.permissions.create_emojis.name",
		"authentication.permissions.create_emojis.description",
		PermissionScopeTeam,
	}
	PermissionDeleteEmojis = &Permission{
		"delete_emojis",
		"authentication.permissions.delete_emojis.name",
		"authentication.permissions.delete_emojis.description",
		PermissionScopeTeam,
	}
	PermissionDeleteOthersEmojis = &Permission{
		"delete_others_emojis",
		"authentication.permissions.delete_others_emojis.name",
		"authentication.permissions.delete_others_emojis.description",
		PermissionScopeTeam,
	}
	PermissionCreatePost = &Permission{
		"create_post",
		"authentication.permissions.create_post.name",
		"authentication.permissions.create_post.description",
		PermissionScopeChannel,
	}
	PermissionCreatePostPublic = &Permission{
		"create_post_public",
		"authentication.permissions.create_post_public.name",
		"authentication.permissions.create_post_public.description",
		PermissionScopeChannel,
	}
	PermissionCreatePostEphemeral = &Permission{
		"create_post_ephemeral",
		"authentication.permissions.create_post_ephemeral.name",
		"authentication.permissions.create_post_ephemeral.description",
		PermissionScopeChannel,
	}
	PermissionEditPost = &Permission{
		"edit_post",
		"authentication.permissions.edit_post.name",
		"authentication.permissions.edit_post.description",
		PermissionScopeChannel,
	}
	PermissionEditOthersPosts = &Permission{
		"edit_others_posts",
		"authentication.permissions.edit_others_posts.name",
		"authentication.permissions.edit_others_posts.description",
		PermissionScopeChannel,
	}
	PermissionDeletePost = &Permission{
		"delete_post",
		"authentication.permissions.delete_post.name",
		"authentication.permissions.delete_post.description",
		PermissionScopeChannel,
	}
	PermissionDeleteOthersPosts = &Permission{
		"delete_others_posts",
		"authentication.permissions.delete_others_posts.name",
		"authentication.permissions.delete_others_posts.description",
		PermissionScopeChannel,
	}
	PermissionManageSharedChannels = &Permission{
		"manage_shared_channels",
		"authentication.permissions.manage_shared_channels.name",
		"authentication.permissions.manage_shared_channels.description",
		PermissionScopeSystem,
	}
	PermissionManageSecureConnections = &Permission{
		"manage_secure_connections",
		"authentication.permissions.manage_secure_connections.name",
		"authentication.permissions.manage_secure_connections.description",
		PermissionScopeSystem,
	}

	PermissionCreateDataRetentionJob = &Permission{
		"create_data_retention_job",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionReadDataRetentionJob = &Permission{
		"read_data_retention_job",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionCreateComplianceExportJob = &Permission{
		"create_compliance_export_job",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionReadComplianceExportJob = &Permission{
		"read_compliance_export_job",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionReadAudits = &Permission{
		"read_audits",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionPurgeBleveIndexes = &Permission{
		"purge_bleve_indexes",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionCreatePostBleveIndexesJob = &Permission{
		"create_post_bleve_indexes_job",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionCreateLdapSyncJob = &Permission{
		"create_ldap_sync_job",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionReadLdapSyncJob = &Permission{
		"read_ldap_sync_job",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionTestLdap = &Permission{
		"test_ldap",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionInvalidateEmailInvite = &Permission{
		"invalidate_email_invite",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionGetSamlMetadataFromIdp = &Permission{
		"get_saml_metadata_from_idp",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionAddSamlPublicCert = &Permission{
		"add_saml_public_cert",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionAddSamlPrivateCert = &Permission{
		"add_saml_private_cert",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionAddSamlIdpCert = &Permission{
		"add_saml_idp_cert",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionRemoveSamlPublicCert = &Permission{
		"remove_saml_public_cert",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionRemoveSamlPrivateCert = &Permission{
		"remove_saml_private_cert",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionRemoveSamlIdpCert = &Permission{
		"remove_saml_idp_cert",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionGetSamlCertStatus = &Permission{
		"get_saml_cert_status",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionAddLdapPublicCert = &Permission{
		"add_ldap_public_cert",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionAddLdapPrivateCert = &Permission{
		"add_ldap_private_cert",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionRemoveLdapPublicCert = &Permission{
		"remove_ldap_public_cert",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionRemoveLdapPrivateCert = &Permission{
		"remove_ldap_private_cert",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionGetLogs = &Permission{
		"get_logs",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionReadLicenseInformation = &Permission{
		"read_license_information",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionGetAnalytics = &Permission{
		"get_analytics",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionManageLicenseInformation = &Permission{
		"manage_license_information",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionDownloadComplianceExportResult = &Permission{
		"download_compliance_export_result",
		"authentication.permissions.download_compliance_export_result.name",
		"authentication.permissions.download_compliance_export_result.description",
		PermissionScopeSystem,
	}

	PermissionTestSiteURL = &Permission{
		"test_site_url",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionTestElasticsearch = &Permission{
		"test_elasticsearch",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionTestS3 = &Permission{
		"test_s3",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionReloadConfig = &Permission{
		"reload_config",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionInvalidateCaches = &Permission{
		"invalidate_caches",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionRecycleDatabaseConnections = &Permission{
		"recycle_database_connections",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionPurgeElasticsearchIndexes = &Permission{
		"purge_elasticsearch_indexes",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionTestEmail = &Permission{
		"test_email",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionCreateElasticsearchPostIndexingJob = &Permission{
		"create_elasticsearch_post_indexing_job",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionCreateElasticsearchPostAggregationJob = &Permission{
		"create_elasticsearch_post_aggregation_job",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionReadElasticsearchPostIndexingJob = &Permission{
		"read_elasticsearch_post_indexing_job",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionReadElasticsearchPostAggregationJob = &Permission{
		"read_elasticsearch_post_aggregation_job",
		"",
		"",
		PermissionScopeSystem,
	}

	PermissionRemoveUserFromTeam = &Permission{
		"remove_user_from_team",
		"authentication.permissions.remove_user_from_team.name",
		"authentication.permissions.remove_user_from_team.description",
		PermissionScopeTeam,
	}
	PermissionCreateTeam = &Permission{
		"create_team",
		"authentication.permissions.create_team.name",
		"authentication.permissions.create_team.description",
		PermissionScopeSystem,
	}
	PermissionManageTeam = &Permission{
		"manage_team",
		"authentication.permissions.manage_team.name",
		"authentication.permissions.manage_team.description",
		PermissionScopeTeam,
	}
	PermissionImportTeam = &Permission{
		"import_team",
		"authentication.permissions.import_team.name",
		"authentication.permissions.import_team.description",
		PermissionScopeTeam,
	}
	PermissionViewTeam = &Permission{
		"view_team",
		"authentication.permissions.view_team.name",
		"authentication.permissions.view_team.description",
		PermissionScopeTeam,
	}
	PermissionListUsersWithoutTeam = &Permission{
		"list_users_without_team",
		"authentication.permissions.list_users_without_team.name",
		"authentication.permissions.list_users_without_team.description",
		PermissionScopeSystem,
	}
	PermissionCreateUserAccessToken = &Permission{
		"create_user_access_token",
		"authentication.permissions.create_user_access_token.name",
		"authentication.permissions.create_user_access_token.description",
		PermissionScopeSystem,
	}
	PermissionReadUserAccessToken = &Permission{
		"read_user_access_token",
		"authentication.permissions.read_user_access_token.name",
		"authentication.permissions.read_user_access_token.description",
		PermissionScopeSystem,
	}
	PermissionRevokeUserAccessToken = &Permission{
		"revoke_user_access_token",
		"authentication.permissions.revoke_user_access_token.name",
		"authentication.permissions.revoke_user_access_token.description",
		PermissionScopeSystem,
	}
	PermissionCreateBot = &Permission{
		"create_bot",
		"authentication.permissions.create_bot.name",
		"authentication.permissions.create_bot.description",
		PermissionScopeSystem,
	}
	PermissionAssignBot = &Permission{
		"assign_bot",
		"authentication.permissions.assign_bot.name",
		"authentication.permissions.assign_bot.description",
		PermissionScopeSystem,
	}
	PermissionReadBots = &Permission{
		"read_bots",
		"authentication.permissions.read_bots.name",
		"authentication.permissions.read_bots.description",
		PermissionScopeSystem,
	}
	PermissionReadOthersBots = &Permission{
		"read_others_bots",
		"authentication.permissions.read_others_bots.name",
		"authentication.permissions.read_others_bots.description",
		PermissionScopeSystem,
	}
	PermissionManageBots = &Permission{
		"manage_bots",
		"authentication.permissions.manage_bots.name",
		"authentication.permissions.manage_bots.description",
		PermissionScopeSystem,
	}
	PermissionManageOthersBots = &Permission{
		"manage_others_bots",
		"authentication.permissions.manage_others_bots.name",
		"authentication.permissions.manage_others_bots.description",
		PermissionScopeSystem,
	}
	PermissionReadJobs = &Permission{
		"read_jobs",
		"authentication.permisssions.read_jobs.name",
		"authentication.permisssions.read_jobs.description",
		PermissionScopeSystem,
	}
	PermissionManageJobs = &Permission{
		"manage_jobs",
		"authentication.permisssions.manage_jobs.name",
		"authentication.permisssions.manage_jobs.description",
		PermissionScopeSystem,
	}
	PermissionViewMembers = &Permission{
		"view_members",
		"authentication.permisssions.view_members.name",
		"authentication.permisssions.view_members.description",
		PermissionScopeTeam,
	}
	PermissionInviteGuest = &Permission{
		"invite_guest",
		"authentication.permissions.invite_guest.name",
		"authentication.permissions.invite_guest.description",
		PermissionScopeTeam,
	}
	PermissionPromoteGuest = &Permission{
		"promote_guest",
		"authentication.permissions.promote_guest.name",
		"authentication.permissions.promote_guest.description",
		PermissionScopeSystem,
	}
	PermissionDemoteToGuest = &Permission{
		"demote_to_guest",
		"authentication.permissions.demote_to_guest.name",
		"authentication.permissions.demote_to_guest.description",
		PermissionScopeSystem,
	}
	PermissionUseChannelMentions = &Permission{
		"use_channel_mentions",
		"authentication.permissions.use_channel_mentions.name",
		"authentication.permissions.use_channel_mentions.description",
		PermissionScopeChannel,
	}
	PermissionUseGroupMentions = &Permission{
		"use_group_mentions",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeChannel,
	}
	PermissionReadOtherUsersTeams = &Permission{
		"read_other_users_teams",
		"authentication.permissions.read_other_users_teams.name",
		"authentication.permissions.read_other_users_teams.description",
		PermissionScopeSystem,
	}
	PermissionEditBrand = &Permission{
		"edit_brand",
		"authentication.permissions.edit_brand.name",
		"authentication.permissions.edit_brand.description",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleReadAbout = &Permission{
		"sysconsole_read_about",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleWriteAbout = &Permission{
		"sysconsole_write_about",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadAboutEditionAndLicense = &Permission{
		"sysconsole_read_about_edition_and_license",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteAboutEditionAndLicense = &Permission{
		"sysconsole_write_about_edition_and_license",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadBilling = &Permission{
		"sysconsole_read_billing",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteBilling = &Permission{
		"sysconsole_write_billing",
		"",
		"",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleReadReporting = &Permission{
		"sysconsole_read_reporting",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleWriteReporting = &Permission{
		"sysconsole_write_reporting",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadReportingSiteStatistics = &Permission{
		"sysconsole_read_reporting_site_statistics",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteReportingSiteStatistics = &Permission{
		"sysconsole_write_reporting_site_statistics",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadReportingTeamStatistics = &Permission{
		"sysconsole_read_reporting_team_statistics",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteReportingTeamStatistics = &Permission{
		"sysconsole_write_reporting_team_statistics",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadReportingServerLogs = &Permission{
		"sysconsole_read_reporting_server_logs",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteReportingServerLogs = &Permission{
		"sysconsole_write_reporting_server_logs",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadUserManagementUsers = &Permission{
		"sysconsole_read_user_management_users",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteUserManagementUsers = &Permission{
		"sysconsole_write_user_management_users",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadUserManagementGroups = &Permission{
		"sysconsole_read_user_management_groups",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteUserManagementGroups = &Permission{
		"sysconsole_write_user_management_groups",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadUserManagementTeams = &Permission{
		"sysconsole_read_user_management_teams",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteUserManagementTeams = &Permission{
		"sysconsole_write_user_management_teams",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadUserManagementChannels = &Permission{
		"sysconsole_read_user_management_channels",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteUserManagementChannels = &Permission{
		"sysconsole_write_user_management_channels",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadUserManagementPermissions = &Permission{
		"sysconsole_read_user_management_permissions",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteUserManagementPermissions = &Permission{
		"sysconsole_write_user_management_permissions",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadUserManagementSystemRoles = &Permission{
		"sysconsole_read_user_management_system_roles",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteUserManagementSystemRoles = &Permission{
		"sysconsole_write_user_management_system_roles",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleReadEnvironment = &Permission{
		"sysconsole_read_environment",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleWriteEnvironment = &Permission{
		"sysconsole_write_environment",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadEnvironmentWebServer = &Permission{
		"sysconsole_read_environment_web_server",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteEnvironmentWebServer = &Permission{
		"sysconsole_write_environment_web_server",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadEnvironmentDatabase = &Permission{
		"sysconsole_read_environment_database",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteEnvironmentDatabase = &Permission{
		"sysconsole_write_environment_database",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadEnvironmentElasticsearch = &Permission{
		"sysconsole_read_environment_elasticsearch",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteEnvironmentElasticsearch = &Permission{
		"sysconsole_write_environment_elasticsearch",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadEnvironmentFileStorage = &Permission{
		"sysconsole_read_environment_file_storage",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteEnvironmentFileStorage = &Permission{
		"sysconsole_write_environment_file_storage",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadEnvironmentImageProxy = &Permission{
		"sysconsole_read_environment_image_proxy",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteEnvironmentImageProxy = &Permission{
		"sysconsole_write_environment_image_proxy",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadEnvironmentSMTP = &Permission{
		"sysconsole_read_environment_smtp",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteEnvironmentSMTP = &Permission{
		"sysconsole_write_environment_smtp",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadEnvironmentPushNotificationServer = &Permission{
		"sysconsole_read_environment_push_notification_server",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteEnvironmentPushNotificationServer = &Permission{
		"sysconsole_write_environment_push_notification_server",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadEnvironmentHighAvailability = &Permission{
		"sysconsole_read_environment_high_availability",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteEnvironmentHighAvailability = &Permission{
		"sysconsole_write_environment_high_availability",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadEnvironmentRateLimiting = &Permission{
		"sysconsole_read_environment_rate_limiting",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteEnvironmentRateLimiting = &Permission{
		"sysconsole_write_environment_rate_limiting",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadEnvironmentLogging = &Permission{
		"sysconsole_read_environment_logging",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteEnvironmentLogging = &Permission{
		"sysconsole_write_environment_logging",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadEnvironmentSessionLengths = &Permission{
		"sysconsole_read_environment_session_lengths",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteEnvironmentSessionLengths = &Permission{
		"sysconsole_write_environment_session_lengths",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadEnvironmentPerformanceMonitoring = &Permission{
		"sysconsole_read_environment_performance_monitoring",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteEnvironmentPerformanceMonitoring = &Permission{
		"sysconsole_write_environment_performance_monitoring",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadEnvironmentDeveloper = &Permission{
		"sysconsole_read_environment_developer",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteEnvironmentDeveloper = &Permission{
		"sysconsole_write_environment_developer",
		"",
		"",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleReadSite = &Permission{
		"sysconsole_read_site",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleWriteSite = &Permission{
		"sysconsole_write_site",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}

	PermissionSysconsoleReadSiteCustomization = &Permission{
		"sysconsole_read_site_customization",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteSiteCustomization = &Permission{
		"sysconsole_write_site_customization",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadSiteLocalization = &Permission{
		"sysconsole_read_site_localization",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteSiteLocalization = &Permission{
		"sysconsole_write_site_localization",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadSiteUsersAndTeams = &Permission{
		"sysconsole_read_site_users_and_teams",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteSiteUsersAndTeams = &Permission{
		"sysconsole_write_site_users_and_teams",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadSiteNotifications = &Permission{
		"sysconsole_read_site_notifications",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteSiteNotifications = &Permission{
		"sysconsole_write_site_notifications",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadSiteAnnouncementBanner = &Permission{
		"sysconsole_read_site_announcement_banner",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteSiteAnnouncementBanner = &Permission{
		"sysconsole_write_site_announcement_banner",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadSiteEmoji = &Permission{
		"sysconsole_read_site_emoji",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteSiteEmoji = &Permission{
		"sysconsole_write_site_emoji",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadSitePosts = &Permission{
		"sysconsole_read_site_posts",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteSitePosts = &Permission{
		"sysconsole_write_site_posts",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadSiteFileSharingAndDownloads = &Permission{
		"sysconsole_read_site_file_sharing_and_downloads",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteSiteFileSharingAndDownloads = &Permission{
		"sysconsole_write_site_file_sharing_and_downloads",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadSitePublicLinks = &Permission{
		"sysconsole_read_site_public_links",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteSitePublicLinks = &Permission{
		"sysconsole_write_site_public_links",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadSiteNotices = &Permission{
		"sysconsole_read_site_notices",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteSiteNotices = &Permission{
		"sysconsole_write_site_notices",
		"",
		"",
		PermissionScopeSystem,
	}

	// Deprecated
	PermissionSysconsoleReadAuthentication = &Permission{
		"sysconsole_read_authentication",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	// Deprecated
	PermissionSysconsoleWriteAuthentication = &Permission{
		"sysconsole_write_authentication",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadAuthenticationSignup = &Permission{
		"sysconsole_read_authentication_signup",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteAuthenticationSignup = &Permission{
		"sysconsole_write_authentication_signup",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadAuthenticationEmail = &Permission{
		"sysconsole_read_authentication_email",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteAuthenticationEmail = &Permission{
		"sysconsole_write_authentication_email",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadAuthenticationPassword = &Permission{
		"sysconsole_read_authentication_password",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteAuthenticationPassword = &Permission{
		"sysconsole_write_authentication_password",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadAuthenticationMfa = &Permission{
		"sysconsole_read_authentication_mfa",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteAuthenticationMfa = &Permission{
		"sysconsole_write_authentication_mfa",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadAuthenticationLdap = &Permission{
		"sysconsole_read_authentication_ldap",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteAuthenticationLdap = &Permission{
		"sysconsole_write_authentication_ldap",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadAuthenticationSaml = &Permission{
		"sysconsole_read_authentication_saml",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteAuthenticationSaml = &Permission{
		"sysconsole_write_authentication_saml",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadAuthenticationOpenid = &Permission{
		"sysconsole_read_authentication_openid",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteAuthenticationOpenid = &Permission{
		"sysconsole_write_authentication_openid",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadAuthenticationGuestAccess = &Permission{
		"sysconsole_read_authentication_guest_access",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteAuthenticationGuestAccess = &Permission{
		"sysconsole_write_authentication_guest_access",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadPlugins = &Permission{
		"sysconsole_read_plugins",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWritePlugins = &Permission{
		"sysconsole_write_plugins",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleReadIntegrations = &Permission{
		"sysconsole_read_integrations",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleWriteIntegrations = &Permission{
		"sysconsole_write_integrations",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadIntegrationsIntegrationManagement = &Permission{
		"sysconsole_read_integrations_integration_management",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteIntegrationsIntegrationManagement = &Permission{
		"sysconsole_write_integrations_integration_management",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadIntegrationsBotAccounts = &Permission{
		"sysconsole_read_integrations_bot_accounts",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteIntegrationsBotAccounts = &Permission{
		"sysconsole_write_integrations_bot_accounts",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadIntegrationsGif = &Permission{
		"sysconsole_read_integrations_gif",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteIntegrationsGif = &Permission{
		"sysconsole_write_integrations_gif",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadIntegrationsCors = &Permission{
		"sysconsole_read_integrations_cors",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteIntegrationsCors = &Permission{
		"sysconsole_write_integrations_cors",
		"",
		"",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleReadCompliance = &Permission{
		"sysconsole_read_compliance",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleWriteCompliance = &Permission{
		"sysconsole_write_compliance",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadComplianceDataRetentionPolicy = &Permission{
		"sysconsole_read_compliance_data_retention_policy",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteComplianceDataRetentionPolicy = &Permission{
		"sysconsole_write_compliance_data_retention_policy",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadComplianceComplianceExport = &Permission{
		"sysconsole_read_compliance_compliance_export",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteComplianceComplianceExport = &Permission{
		"sysconsole_write_compliance_compliance_export",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadComplianceComplianceMonitoring = &Permission{
		"sysconsole_read_compliance_compliance_monitoring",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteComplianceComplianceMonitoring = &Permission{
		"sysconsole_write_compliance_compliance_monitoring",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadComplianceCustomTermsOfService = &Permission{
		"sysconsole_read_compliance_custom_terms_of_service",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteComplianceCustomTermsOfService = &Permission{
		"sysconsole_write_compliance_custom_terms_of_service",
		"",
		"",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleReadExperimental = &Permission{
		"sysconsole_read_experimental",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	// DEPRECATED
	PermissionSysconsoleWriteExperimental = &Permission{
		"sysconsole_write_experimental",
		"authentication.permissions.use_group_mentions.name",
		"authentication.permissions.use_group_mentions.description",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadExperimentalFeatures = &Permission{
		"sysconsole_read_experimental_features",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteExperimentalFeatures = &Permission{
		"sysconsole_write_experimental_features",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadExperimentalFeatureFlags = &Permission{
		"sysconsole_read_experimental_feature_flags",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteExperimentalFeatureFlags = &Permission{
		"sysconsole_write_experimental_feature_flags",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleReadExperimentalBleve = &Permission{
		"sysconsole_read_experimental_bleve",
		"",
		"",
		PermissionScopeSystem,
	}
	PermissionSysconsoleWriteExperimentalBleve = &Permission{
		"sysconsole_write_experimental_bleve",
		"",
		"",
		PermissionScopeSystem,
	}

	// Playbooks
	PermissionPublicPlaybookCreate = &Permission{
		"playbook_public_create",
		"",
		"",
		PermissionScopeTeam,
	}

	PermissionPublicPlaybookManageProperties = &Permission{
		"playbook_public_manage_properties",
		"",
		"",
		PermissionScopePlaybook,
	}

	PermissionPublicPlaybookManageMembers = &Permission{
		"playbook_public_manage_members",
		"",
		"",
		PermissionScopePlaybook,
	}

	PermissionPublicPlaybookView = &Permission{
		"playbook_public_view",
		"",
		"",
		PermissionScopePlaybook,
	}

	PermissionPublicPlaybookMakePrivate = &Permission{
		"playbook_public_make_private",
		"",
		"",
		PermissionScopePlaybook,
	}

	PermissionPrivatePlaybookCreate = &Permission{
		"playbook_private_create",
		"",
		"",
		PermissionScopeTeam,
	}

	PermissionPrivatePlaybookManageProperties = &Permission{
		"playbook_private_manage_properties",
		"",
		"",
		PermissionScopePlaybook,
	}

	PermissionPrivatePlaybookManageMembers = &Permission{
		"playbook_private_manage_members",
		"",
		"",
		PermissionScopePlaybook,
	}

	PermissionPrivatePlaybookView = &Permission{
		"playbook_private_view",
		"",
		"",
		PermissionScopePlaybook,
	}

	PermissionPrivatePlaybookMakePublic = &Permission{
		"playbook_private_make_public",
		"",
		"",
		PermissionScopePlaybook,
	}

	PermissionRunCreate = &Permission{
		"run_create",
		"",
		"",
		PermissionScopePlaybook,
	}

	PermissionRunManageProperties = &Permission{
		"run_manage_properties",
		"",
		"",
		PermissionScopeRun,
	}

	PermissionRunManageMembers = &Permission{
		"run_manage_members",
		"",
		"",
		PermissionScopeRun,
	}

	PermissionRunView = &Permission{
		"run_view",
		"",
		"",
		PermissionScopeRun,
	}

	SysconsoleReadPermissions = []*Permission{
		PermissionSysconsoleReadAboutEditionAndLicense,
		PermissionSysconsoleReadBilling,
		PermissionSysconsoleReadReportingSiteStatistics,
		PermissionSysconsoleReadReportingTeamStatistics,
		PermissionSysconsoleReadReportingServerLogs,
		PermissionSysconsoleReadUserManagementUsers,
		PermissionSysconsoleReadUserManagementGroups,
		PermissionSysconsoleReadUserManagementTeams,
		PermissionSysconsoleReadUserManagementChannels,
		PermissionSysconsoleReadUserManagementPermissions,
		PermissionSysconsoleReadUserManagementSystemRoles,
		PermissionSysconsoleReadEnvironmentWebServer,
		PermissionSysconsoleReadEnvironmentDatabase,
		PermissionSysconsoleReadEnvironmentElasticsearch,
		PermissionSysconsoleReadEnvironmentFileStorage,
		PermissionSysconsoleReadEnvironmentImageProxy,
		PermissionSysconsoleReadEnvironmentSMTP,
		PermissionSysconsoleReadEnvironmentPushNotificationServer,
		PermissionSysconsoleReadEnvironmentHighAvailability,
		PermissionSysconsoleReadEnvironmentRateLimiting,
		PermissionSysconsoleReadEnvironmentLogging,
		PermissionSysconsoleReadEnvironmentSessionLengths,
		PermissionSysconsoleReadEnvironmentPerformanceMonitoring,
		PermissionSysconsoleReadEnvironmentDeveloper,
		PermissionSysconsoleReadSiteCustomization,
		PermissionSysconsoleReadSiteLocalization,
		PermissionSysconsoleReadSiteUsersAndTeams,
		PermissionSysconsoleReadSiteNotifications,
		PermissionSysconsoleReadSiteAnnouncementBanner,
		PermissionSysconsoleReadSiteEmoji,
		PermissionSysconsoleReadSitePosts,
		PermissionSysconsoleReadSiteFileSharingAndDownloads,
		PermissionSysconsoleReadSitePublicLinks,
		PermissionSysconsoleReadSiteNotices,
		PermissionSysconsoleReadAuthenticationSignup,
		PermissionSysconsoleReadAuthenticationEmail,
		PermissionSysconsoleReadAuthenticationPassword,
		PermissionSysconsoleReadAuthenticationMfa,
		PermissionSysconsoleReadAuthenticationLdap,
		PermissionSysconsoleReadAuthenticationSaml,
		PermissionSysconsoleReadAuthenticationOpenid,
		PermissionSysconsoleReadAuthenticationGuestAccess,
		PermissionSysconsoleReadPlugins,
		PermissionSysconsoleReadIntegrationsIntegrationManagement,
		PermissionSysconsoleReadIntegrationsBotAccounts,
		PermissionSysconsoleReadIntegrationsGif,
		PermissionSysconsoleReadIntegrationsCors,
		PermissionSysconsoleReadComplianceDataRetentionPolicy,
		PermissionSysconsoleReadComplianceComplianceExport,
		PermissionSysconsoleReadComplianceComplianceMonitoring,
		PermissionSysconsoleReadComplianceCustomTermsOfService,
		PermissionSysconsoleReadExperimentalFeatures,
		PermissionSysconsoleReadExperimentalFeatureFlags,
		PermissionSysconsoleReadExperimentalBleve,
	}

	SysconsoleWritePermissions = []*Permission{
		PermissionSysconsoleWriteAboutEditionAndLicense,
		PermissionSysconsoleWriteBilling,
		PermissionSysconsoleWriteReportingSiteStatistics,
		PermissionSysconsoleWriteReportingTeamStatistics,
		PermissionSysconsoleWriteReportingServerLogs,
		PermissionSysconsoleWriteUserManagementUsers,
		PermissionSysconsoleWriteUserManagementGroups,
		PermissionSysconsoleWriteUserManagementTeams,
		PermissionSysconsoleWriteUserManagementChannels,
		PermissionSysconsoleWriteUserManagementPermissions,
		PermissionSysconsoleWriteUserManagementSystemRoles,
		PermissionSysconsoleWriteEnvironmentWebServer,
		PermissionSysconsoleWriteEnvironmentDatabase,
		PermissionSysconsoleWriteEnvironmentElasticsearch,
		PermissionSysconsoleWriteEnvironmentFileStorage,
		PermissionSysconsoleWriteEnvironmentImageProxy,
		PermissionSysconsoleWriteEnvironmentSMTP,
		PermissionSysconsoleWriteEnvironmentPushNotificationServer,
		PermissionSysconsoleWriteEnvironmentHighAvailability,
		PermissionSysconsoleWriteEnvironmentRateLimiting,
		PermissionSysconsoleWriteEnvironmentLogging,
		PermissionSysconsoleWriteEnvironmentSessionLengths,
		PermissionSysconsoleWriteEnvironmentPerformanceMonitoring,
		PermissionSysconsoleWriteEnvironmentDeveloper,
		PermissionSysconsoleWriteSiteCustomization,
		PermissionSysconsoleWriteSiteLocalization,
		PermissionSysconsoleWriteSiteUsersAndTeams,
		PermissionSysconsoleWriteSiteNotifications,
		PermissionSysconsoleWriteSiteAnnouncementBanner,
		PermissionSysconsoleWriteSiteEmoji,
		PermissionSysconsoleWriteSitePosts,
		PermissionSysconsoleWriteSiteFileSharingAndDownloads,
		PermissionSysconsoleWriteSitePublicLinks,
		PermissionSysconsoleWriteSiteNotices,
		PermissionSysconsoleWriteAuthenticationSignup,
		PermissionSysconsoleWriteAuthenticationEmail,
		PermissionSysconsoleWriteAuthenticationPassword,
		PermissionSysconsoleWriteAuthenticationMfa,
		PermissionSysconsoleWriteAuthenticationLdap,
		PermissionSysconsoleWriteAuthenticationSaml,
		PermissionSysconsoleWriteAuthenticationOpenid,
		PermissionSysconsoleWriteAuthenticationGuestAccess,
		PermissionSysconsoleWritePlugins,
		PermissionSysconsoleWriteIntegrationsIntegrationManagement,
		PermissionSysconsoleWriteIntegrationsBotAccounts,
		PermissionSysconsoleWriteIntegrationsGif,
		PermissionSysconsoleWriteIntegrationsCors,
		PermissionSysconsoleWriteComplianceDataRetentionPolicy,
		PermissionSysconsoleWriteComplianceComplianceExport,
		PermissionSysconsoleWriteComplianceComplianceMonitoring,
		PermissionSysconsoleWriteComplianceCustomTermsOfService,
		PermissionSysconsoleWriteExperimentalFeatures,
		PermissionSysconsoleWriteExperimentalFeatureFlags,
		PermissionSysconsoleWriteExperimentalBleve,
	}

	SystemScopedPermissionsMinusSysconsole := []*Permission{
		PermissionAssignSystemAdminRole,
		PermissionManageRoles,
		PermissionManageSystem,
		PermissionCreateDirectChannel,
		PermissionCreateGroupChannel,
		PermissionListPublicTeams,
		PermissionJoinPublicTeams,
		PermissionListPrivateTeams,
		PermissionJoinPrivateTeams,
		PermissionEditOtherUsers,
		PermissionReadOtherUsersTeams,
		PermissionGetPublicLink,
		PermissionManageOAuth,
		PermissionManageSystemWideOAuth,
		PermissionCreateTeam,
		PermissionListUsersWithoutTeam,
		PermissionCreateUserAccessToken,
		PermissionReadUserAccessToken,
		PermissionRevokeUserAccessToken,
		PermissionCreateBot,
		PermissionAssignBot,
		PermissionReadBots,
		PermissionReadOthersBots,
		PermissionManageBots,
		PermissionManageOthersBots,
		PermissionReadJobs,
		PermissionManageJobs,
		PermissionPromoteGuest,
		PermissionDemoteToGuest,
		PermissionEditBrand,
		PermissionManageSharedChannels,
		PermissionManageSecureConnections,
		PermissionDownloadComplianceExportResult,
		PermissionCreateDataRetentionJob,
		PermissionReadDataRetentionJob,
		PermissionCreateComplianceExportJob,
		PermissionReadComplianceExportJob,
		PermissionReadAudits,
		PermissionTestSiteURL,
		PermissionTestElasticsearch,
		PermissionTestS3,
		PermissionReloadConfig,
		PermissionInvalidateCaches,
		PermissionRecycleDatabaseConnections,
		PermissionPurgeElasticsearchIndexes,
		PermissionTestEmail,
		PermissionCreateElasticsearchPostIndexingJob,
		PermissionCreateElasticsearchPostAggregationJob,
		PermissionReadElasticsearchPostIndexingJob,
		PermissionReadElasticsearchPostAggregationJob,
		PermissionPurgeBleveIndexes,
		PermissionCreatePostBleveIndexesJob,
		PermissionCreateLdapSyncJob,
		PermissionReadLdapSyncJob,
		PermissionTestLdap,
		PermissionInvalidateEmailInvite,
		PermissionGetSamlMetadataFromIdp,
		PermissionAddSamlPublicCert,
		PermissionAddSamlPrivateCert,
		PermissionAddSamlIdpCert,
		PermissionRemoveSamlPublicCert,
		PermissionRemoveSamlPrivateCert,
		PermissionRemoveSamlIdpCert,
		PermissionGetSamlCertStatus,
		PermissionAddLdapPublicCert,
		PermissionAddLdapPrivateCert,
		PermissionRemoveLdapPublicCert,
		PermissionRemoveLdapPrivateCert,
		PermissionGetAnalytics,
		PermissionGetLogs,
		PermissionReadLicenseInformation,
		PermissionManageLicenseInformation,
	}

	TeamScopedPermissions := []*Permission{
		PermissionInviteUser,
		PermissionAddUserToTeam,
		PermissionManageSlashCommands,
		PermissionManageOthersSlashCommands,
		PermissionCreatePublicChannel,
		PermissionCreatePrivateChannel,
		PermissionManageTeamRoles,
		PermissionListTeamChannels,
		PermissionJoinPublicChannels,
		PermissionReadPublicChannel,
		PermissionManageIncomingWebhooks,
		PermissionManageOutgoingWebhooks,
		PermissionManageOthersIncomingWebhooks,
		PermissionManageOthersOutgoingWebhooks,
		PermissionCreateEmojis,
		PermissionDeleteEmojis,
		PermissionDeleteOthersEmojis,
		PermissionRemoveUserFromTeam,
		PermissionManageTeam,
		PermissionImportTeam,
		PermissionViewTeam,
		PermissionViewMembers,
		PermissionInviteGuest,
		PermissionPublicPlaybookCreate,
		PermissionPrivatePlaybookCreate,
	}

	ChannelScopedPermissions := []*Permission{
		PermissionUseSlashCommands,
		PermissionManagePublicChannelMembers,
		PermissionManagePrivateChannelMembers,
		PermissionManageChannelRoles,
		PermissionManagePublicChannelProperties,
		PermissionManagePrivateChannelProperties,
		PermissionConvertPublicChannelToPrivate,
		PermissionConvertPrivateChannelToPublic,
		PermissionDeletePublicChannel,
		PermissionDeletePrivateChannel,
		PermissionReadChannel,
		PermissionReadPublicChannelGroups,
		PermissionReadPrivateChannelGroups,
		PermissionAddReaction,
		PermissionRemoveReaction,
		PermissionRemoveOthersReactions,
		PermissionUploadFile,
		PermissionCreatePost,
		PermissionCreatePostPublic,
		PermissionCreatePostEphemeral,
		PermissionEditPost,
		PermissionEditOthersPosts,
		PermissionDeletePost,
		PermissionDeleteOthersPosts,
		PermissionUseChannelMentions,
		PermissionUseGroupMentions,
	}

	DeprecatedPermissions = []*Permission{
		PermissionPermanentDeleteUser,
		PermissionManageWebhooks,
		PermissionManageOthersWebhooks,
		PermissionManageEmojis,
		PermissionManageOthersEmojis,
		PermissionSysconsoleReadAuthentication,
		PermissionSysconsoleWriteAuthentication,
		PermissionSysconsoleReadSite,
		PermissionSysconsoleWriteSite,
		PermissionSysconsoleReadEnvironment,
		PermissionSysconsoleWriteEnvironment,
		PermissionSysconsoleReadReporting,
		PermissionSysconsoleWriteReporting,
		PermissionSysconsoleReadAbout,
		PermissionSysconsoleWriteAbout,
		PermissionSysconsoleReadExperimental,
		PermissionSysconsoleWriteExperimental,
		PermissionSysconsoleReadIntegrations,
		PermissionSysconsoleWriteIntegrations,
		PermissionSysconsoleReadCompliance,
		PermissionSysconsoleWriteCompliance,
	}

	PlaybookScopedPermissions := []*Permission{
		PermissionPublicPlaybookManageProperties,
		PermissionPublicPlaybookManageMembers,
		PermissionPublicPlaybookView,
		PermissionPublicPlaybookMakePrivate,
		PermissionPrivatePlaybookManageProperties,
		PermissionPrivatePlaybookManageMembers,
		PermissionPrivatePlaybookView,
		PermissionPrivatePlaybookMakePublic,
		PermissionRunCreate,
	}

	RunScopedPermissions := []*Permission{
		PermissionRunManageProperties,
		PermissionRunManageMembers,
		PermissionRunView,
	}

	AllPermissions = []*Permission{}
	AllPermissions = append(AllPermissions, SystemScopedPermissionsMinusSysconsole...)
	AllPermissions = append(AllPermissions, TeamScopedPermissions...)
	AllPermissions = append(AllPermissions, ChannelScopedPermissions...)
	AllPermissions = append(AllPermissions, SysconsoleReadPermissions...)
	AllPermissions = append(AllPermissions, SysconsoleWritePermissions...)
	AllPermissions = append(AllPermissions, PlaybookScopedPermissions...)
	AllPermissions = append(AllPermissions, RunScopedPermissions...)

	ChannelModeratedPermissions = []string{
		PermissionCreatePost.Id,
		"create_reactions",
		"manage_members",
		PermissionUseChannelMentions.Id,
	}

	ChannelModeratedPermissionsMap = map[string]string{
		PermissionCreatePost.Id:                  ChannelModeratedPermissions[0],
		PermissionAddReaction.Id:                 ChannelModeratedPermissions[1],
		PermissionRemoveReaction.Id:              ChannelModeratedPermissions[1],
		PermissionManagePublicChannelMembers.Id:  ChannelModeratedPermissions[2],
		PermissionManagePrivateChannelMembers.Id: ChannelModeratedPermissions[2],
		PermissionUseChannelMentions.Id:          ChannelModeratedPermissions[3],
	}
}

func init() {
	initializePermissions()
}