Example #1
0
        public LoginStateModel GetLoginState()
        {
            var userInfo = userReader.GetCurrentUserInfo();
            var user     = (userInfo?.Identity != null) ? data.Get(userInfo.Identity) : null;

            return(new LoginStateModel {
                UserInfo = userInfo,
                IsSiteAdmin = user?.SiteAdministrator == true,
            });
        }
Example #2
0
 public IIdentity <User> GetCurrentCapabilityUser() => identityReader.GetCurrentUserInfo()?.Identity;
Example #3
0
 protected ICurrentUserInfo GetUserInfo()
 {
     return(identityReader.GetCurrentUserInfo());
 }