[Security] Don't return all servers on the system when not a root admin and admin level servers are requested
Cleaned up the API endpoint by simplifying the logic and adds test case to cover this bug. If you ever need to list _all_ of the servers on the system you should be using the application API endpoint for the servers most likely.
This commit is contained in:
parent
24db6d9128
commit
f0ac0725b6
6 changed files with 84 additions and 88 deletions
|
@ -57,11 +57,6 @@ class User extends Model implements
|
|||
const USER_LEVEL_USER = 0;
|
||||
const USER_LEVEL_ADMIN = 1;
|
||||
|
||||
const FILTER_LEVEL_ALL = 0;
|
||||
const FILTER_LEVEL_OWNER = 1;
|
||||
const FILTER_LEVEL_ADMIN = 2;
|
||||
const FILTER_LEVEL_SUBUSER = 3;
|
||||
|
||||
/**
|
||||
* The resource name for this model when it is transformed into an
|
||||
* API representation using fractal.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue