/// <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; }
public static void AllowAnonymousRegister(this IApplicationStartContext StartContext, bool IsAllow, AdministrationRights AdministrationRight) { allowAnonymousRegister = IsAllow; administrationRight = AdministrationRight; }
/// <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);