Beispiel #1
0
        private async Task SeetRegularUserRole(ICredentialRoleStore store)
        {
            bool isRegularUserRoleExisting = await store.IsExisting(SentinelCredentialRoleCodes.RegularUser);

            if (!isRegularUserRoleExisting)
            {
                CredentialRole role = new CredentialRole();
                role.Code        = SentinelCredentialRoleCodes.RegularUser;
                role.Description = "Regular authenticated user";

                await store.Create(role);
            }
        }
Beispiel #2
0
        private async Task SeedGlobalAdministratorRole(ICredentialRoleStore store)
        {
            bool isGlobalAdminRoleExisting = await store.IsExisting(SentinelCredentialRoleCodes.GlobalAdmin);

            if (!isGlobalAdminRoleExisting)
            {
                CredentialRole role = new CredentialRole();
                role.Code        = SentinelCredentialRoleCodes.GlobalAdmin;
                role.Description = "Godlike administrator, completely unrestricted";

                await store.Create(role);
            }
        }