mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-23 05:49:07 +02:00
Move disable default auto claim check
This commit is contained in:
@@ -652,7 +652,7 @@ func (s *ServiceManager) ClaimLegacyProfiles(id ipcauth.Identity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *ServiceManager) ClaimDefaultProfileIfNeeded(id ipcauth.Identity) {
|
func (s *ServiceManager) ClaimDefaultProfileIfNeeded(id ipcauth.Identity) {
|
||||||
if !id.Known() || ipcauth.IsPrivilegedCaller(id) {
|
if !id.Known() || ipcauth.IsPrivilegedCaller(id) || !defaultProfileClaimDisabled() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -672,7 +672,7 @@ func (s *ServiceManager) ClaimDefaultProfileIfNeeded(id ipcauth.Identity) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if unowned && !defaultProfileClaimDisabled() && isConsoleUser(id) {
|
if unowned && isConsoleUser(id) {
|
||||||
principal := ipcauth.OwnerPrincipalForIdentity(id)
|
principal := ipcauth.OwnerPrincipalForIdentity(id)
|
||||||
parsed, ok := ipcauth.ParsePrincipal(principal)
|
parsed, ok := ipcauth.ParsePrincipal(principal)
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|||||||
Reference in New Issue
Block a user