mirror of https://github.com/MISP/MISP
fix: [Tagging] Fixed the user/org restrictions not being adhered to when tagging
parent
28028869da
commit
48b30c5095
|
@ -327,10 +327,16 @@ class Tag extends AppModel
|
|||
} else {
|
||||
if (
|
||||
!$user['Role']['perm_site_admin'] &&
|
||||
$existingTag['Tag']['org_id'] != 0 &&
|
||||
$existingTag['Tag']['org_id'] != $user['org_id'] &&
|
||||
$existingTag['Tag']['user_id'] != 0 &&
|
||||
$existingTag['Tag']['user_id'] != $user['id']
|
||||
(
|
||||
(
|
||||
$existingTag['Tag']['org_id'] != 0 &&
|
||||
$existingTag['Tag']['org_id'] != $user['org_id']
|
||||
) ||
|
||||
(
|
||||
$existingTag['Tag']['user_id'] != 0 &&
|
||||
$existingTag['Tag']['user_id'] != $user['id']
|
||||
)
|
||||
)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue