@@ -5,12 +5,94 @@ public static class Policies
55 /// <summary>
66 /// Policy for managing access to the Send feature.
77 /// </summary>
8- public const string Send = "Send" ; // [Authorize(Policy = Policies.Send)]
9- public const string Application = "Application" ; // [Authorize(Policy = Policies.Application)]
10- public const string Web = "Web" ; // [Authorize(Policy = Policies.Web)]
11- public const string Push = "Push" ; // [Authorize(Policy = Policies.Push)]
8+ /// <remarks>
9+ /// <example>
10+ /// Can be used with the <c>Authorize</c> attribute, for example:
11+ /// <code>
12+ /// [Authorize(Policy = Policies.Send)]
13+ /// </code>
14+ /// </example>
15+ /// </remarks>
16+ public const string Send = "Send" ;
17+
18+ /// <summary>
19+ /// Policy to manage access to general API endpoints.
20+ /// </summary>
21+ /// <remarks>
22+ /// <example>
23+ /// Can be used with the <c>Authorize</c> attribute, for example:
24+ /// <code>
25+ /// [Authorize(Policy = Policies.Application)]
26+ /// </code>
27+ /// </example>
28+ /// </remarks>
29+ public const string Application = "Application" ;
30+
31+ /// <summary>
32+ /// Policy to manage access to API endpoints intended for use by the Web Vault and browser extension only.
33+ /// </summary>
34+ /// <remarks>
35+ /// <example>
36+ /// Can be used with the <c>Authorize</c> attribute, for example:
37+ /// <code>
38+ /// [Authorize(Policy = Policies.Web)]
39+ /// </code>
40+ /// </example>
41+ /// </remarks>
42+ public const string Web = "Web" ;
43+
44+ /// <summary>
45+ /// Policy to restrict access to API endpoints for the Push feature.
46+ /// </summary>
47+ /// <remarks>
48+ /// <example>
49+ /// Can be used with the <c>Authorize</c> attribute, for example:
50+ /// <code>
51+ /// [Authorize(Policy = Policies.Push)]
52+ /// </code>
53+ /// </example>
54+ /// </remarks>
55+ public const string Push = "Push" ;
56+
57+ // TODO: This is unused
1258 public const string Licensing = "Licensing" ; // [Authorize(Policy = Policies.Licensing)]
13- public const string Organization = "Organization" ; // [Authorize(Policy = Policies.Organization)]
14- public const string Installation = "Installation" ; // [Authorize(Policy = Policies.Installation)]
15- public const string Secrets = "Secrets" ; // [Authorize(Policy = Policies.Secrets)]
59+
60+ /// <summary>
61+ /// Policy to restrict access to API endpoints related to the Organization features.
62+ /// </summary>
63+ /// <remarks>
64+ /// <example>
65+ /// Can be used with the <c>Authorize</c> attribute, for example:
66+ /// <code>
67+ /// [Authorize(Policy = Policies.Licensing)]
68+ /// </code>
69+ /// </example>
70+ /// </remarks>
71+ public const string Organization = "Organization" ;
72+
73+ /// <summary>
74+ /// Policy to restrict access to API endpoints related to the setting up new installations.
75+ /// </summary>
76+ /// <remarks>
77+ /// <example>
78+ /// Can be used with the <c>Authorize</c> attribute, for example:
79+ /// <code>
80+ /// [Authorize(Policy = Policies.Installation)]
81+ /// </code>
82+ /// </example>
83+ /// </remarks>
84+ public const string Installation = "Installation" ;
85+
86+ /// <summary>
87+ /// Policy to restrict access to API endpoints for Secrets Manager features.
88+ /// </summary>
89+ /// <remarks>
90+ /// <example>
91+ /// Can be used with the <c>Authorize</c> attribute, for example:
92+ /// <code>
93+ /// [Authorize(Policy = Policies.Secrets)]
94+ /// </code>
95+ /// </example>
96+ /// </remarks>
97+ public const string Secrets = "Secrets" ;
1698}
0 commit comments