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); }
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); }
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); }