Beispiel #1
0
        public async Task <int?> _UserGroupID()
        {
            if (_userManager != null)
            {
                Models.User.ApplicationUser user = await _userManager.GetUserAsync(this.User);

                if (user != null)
                {
                    return(user.GroupID);
                }
            }

            return(null);
        }
Beispiel #2
0
        public async Task <bool> _IsSystemAdmin()
        {
            if (_userManager != null)
            {
                Models.User.ApplicationUser user = await _userManager.GetUserAsync(this.User);

                if (user != null)
                {
                    return(user.FlagSystemAdmin);
                }
            }

            return(false);
        }