Beispiel #1
0
        public static void RefreshRoles(AerospikeClient client, User user, bool admin)
        {
            if (admin)
            {
                // Query all roles
                Roles = client.QueryRoles(null);
            }
            else
            {
                List <Role> list = new List <Role>(user.roles.Count);

                foreach (string roleName in user.roles)
                {
                    Role role = client.QueryRole(null, roleName);
                    list.Add(role);
                }
                Roles = list;
            }
        }