Beispiel #1
0
        public void DowngradeLocalAccess(Guid accessToken)
        {
            AccessEndPoint endPoint = this.VerifyAccessToken(accessToken);

            if (this.localPassword == null)
            {
                throw new InvalidOperationException("Local password is not set");
            }

            endPoint.SetAccessPermission(AccessPermission.Guest);
        }
Beispiel #2
0
        public void UpgradeRemoteAccess(Guid accessToken, string password)
        {
            AccessEndPoint endPoint = this.VerifyAccessToken(accessToken);

            if (endPoint.AccessType == AccessType.Local)
            {
                throw new ArgumentException("Access token is a local token!");
            }

            if (password != this.coreSettings.RemoteControlPassword)
            {
                throw new WrongPasswordException("Remote password is wrong");
            }

            endPoint.SetAccessPermission(AccessPermission.Admin);
        }
Beispiel #3
0
        public void UpgradeLocalAccess(Guid accessToken, string password)
        {
            AccessEndPoint endPoint = this.VerifyAccessToken(accessToken);

            if (endPoint.AccessType == AccessType.Remote)
            {
                throw new ArgumentException("Access token is a remote token!");
            }

            if (password != this.localPassword)
            {
                throw new WrongPasswordException("Password is wrong");
            }

            endPoint.SetAccessPermission(AccessPermission.Admin);
        }