mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-19 13:19:06 +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) {
|
||||
if !id.Known() || ipcauth.IsPrivilegedCaller(id) {
|
||||
if !id.Known() || ipcauth.IsPrivilegedCaller(id) || !defaultProfileClaimDisabled() {
|
||||
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)
|
||||
parsed, ok := ipcauth.ParsePrincipal(principal)
|
||||
if !ok {
|
||||
|
||||
Reference in New Issue
Block a user