mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-12 05:37:32 +00:00
tailcfg: add UserProfile.Groups
Updates tailscale/corp#13375 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:

committed by
Brad Fitzpatrick

parent
2a6c237d4c
commit
f1cc8ab3f9
@@ -81,7 +81,7 @@ func (p *Persist) Equals(p2 *Persist) bool {
|
||||
p.OldPrivateNodeKey.Equal(p2.OldPrivateNodeKey) &&
|
||||
p.Provider == p2.Provider &&
|
||||
p.LoginName == p2.LoginName &&
|
||||
p.UserProfile == p2.UserProfile &&
|
||||
p.UserProfile.Equal(&p2.UserProfile) &&
|
||||
p.NetworkLockKey.Equal(p2.NetworkLockKey) &&
|
||||
p.NodeID == p2.NodeID &&
|
||||
reflect.DeepEqual(nilIfEmpty(p.DisallowedTKAStateIDs), nilIfEmpty(p2.DisallowedTKAStateIDs))
|
||||
|
@@ -19,6 +19,7 @@ func (src *Persist) Clone() *Persist {
|
||||
}
|
||||
dst := new(Persist)
|
||||
*dst = *src
|
||||
dst.UserProfile = *src.UserProfile.Clone()
|
||||
dst.DisallowedTKAStateIDs = append(src.DisallowedTKAStateIDs[:0:0], src.DisallowedTKAStateIDs...)
|
||||
return dst
|
||||
}
|
||||
|
@@ -65,13 +65,13 @@ func (v *PersistView) UnmarshalJSON(b []byte) error {
|
||||
func (v PersistView) LegacyFrontendPrivateMachineKey() key.MachinePrivate {
|
||||
return v.ж.LegacyFrontendPrivateMachineKey
|
||||
}
|
||||
func (v PersistView) PrivateNodeKey() key.NodePrivate { return v.ж.PrivateNodeKey }
|
||||
func (v PersistView) OldPrivateNodeKey() key.NodePrivate { return v.ж.OldPrivateNodeKey }
|
||||
func (v PersistView) Provider() string { return v.ж.Provider }
|
||||
func (v PersistView) LoginName() string { return v.ж.LoginName }
|
||||
func (v PersistView) UserProfile() tailcfg.UserProfile { return v.ж.UserProfile }
|
||||
func (v PersistView) NetworkLockKey() key.NLPrivate { return v.ж.NetworkLockKey }
|
||||
func (v PersistView) NodeID() tailcfg.StableNodeID { return v.ж.NodeID }
|
||||
func (v PersistView) PrivateNodeKey() key.NodePrivate { return v.ж.PrivateNodeKey }
|
||||
func (v PersistView) OldPrivateNodeKey() key.NodePrivate { return v.ж.OldPrivateNodeKey }
|
||||
func (v PersistView) Provider() string { return v.ж.Provider }
|
||||
func (v PersistView) LoginName() string { return v.ж.LoginName }
|
||||
func (v PersistView) UserProfile() tailcfg.UserProfileView { return v.ж.UserProfile.View() }
|
||||
func (v PersistView) NetworkLockKey() key.NLPrivate { return v.ж.NetworkLockKey }
|
||||
func (v PersistView) NodeID() tailcfg.StableNodeID { return v.ж.NodeID }
|
||||
func (v PersistView) DisallowedTKAStateIDs() views.Slice[string] {
|
||||
return views.SliceOf(v.ж.DisallowedTKAStateIDs)
|
||||
}
|
||||
|
Reference in New Issue
Block a user