コード例 #1
0
 /// <summary>
 /// Construct a <see cref="TgsAuthorizeAttribute"/> for <see cref="AdministrationRights"/>
 /// </summary>
 /// <param name="requiredRights">The rights required</param>
 public TgsAuthorizeAttribute(AdministrationRights requiredRights)
 {
     Roles      = RightsHelper.RoleNames(requiredRights);
     RightsType = Api.Rights.RightsType.Administration;
 }
コード例 #2
0
 public static void AllowAnonymousRegister(this IApplicationStartContext StartContext, bool IsAllow, AdministrationRights AdministrationRight)
 {
     allowAnonymousRegister = IsAllow;
     administrationRight    = AdministrationRight;
 }
コード例 #3
0
 /// <summary>
 /// Construct a <see cref="TgsAuthorizeAttribute"/> for <see cref="AdministrationRights"/>
 /// </summary>
 /// <param name="requiredRights">The rights required</param>
 public TgsAuthorizeAttribute(AdministrationRights requiredRights) => Roles = RightsHelper.RoleNames(requiredRights);