|
|
@@ -4,6 +4,8 @@
|
|
|
package ipnauth
|
|
|
|
|
|
import (
|
|
|
+ "errors"
|
|
|
+
|
|
|
"tailscale.com/ipn"
|
|
|
)
|
|
|
|
|
|
@@ -17,7 +19,6 @@ type TestActor struct {
|
|
|
CID ClientID // non-zero if the actor represents a connected LocalAPI client
|
|
|
LocalSystem bool // whether the actor represents the special Local System account on Windows
|
|
|
LocalAdmin bool // whether the actor has local admin access
|
|
|
-
|
|
|
}
|
|
|
|
|
|
// UserID implements [Actor].
|
|
|
@@ -29,6 +30,11 @@ func (a *TestActor) Username() (string, error) { return a.Name, a.NameErr }
|
|
|
// ClientID implements [Actor].
|
|
|
func (a *TestActor) ClientID() (_ ClientID, ok bool) { return a.CID, a.CID != NoClientID }
|
|
|
|
|
|
+// CheckProfileAccess implements [Actor].
|
|
|
+func (a *TestActor) CheckProfileAccess(profile ipn.LoginProfileView, _ ProfileAccess) error {
|
|
|
+ return errors.New("profile access denied")
|
|
|
+}
|
|
|
+
|
|
|
// IsLocalSystem implements [Actor].
|
|
|
func (a *TestActor) IsLocalSystem() bool { return a.LocalSystem }
|
|
|
|