Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All items are restricted in tree (Password menu) #4495

Open
manusfreedom opened this issue Nov 26, 2024 · 4 comments
Open

All items are restricted in tree (Password menu) #4495

manusfreedom opened this issue Nov 26, 2024 · 4 comments

Comments

@manusfreedom
Copy link
Contributor

Tested with the latest Github code (master):
I have permission on all items, but I can only see them using the tree (password).
It works with search.

sources/items.queries.php line 3926:
$accessLevel = count($arrTmp) > 0 ? max($arrTmp) : $accessLevel;
My max is 50 (the array has 30 because of W and 50 because of NULL/count=0) but 50 gets no permission (between lines 4227 and 4361).

NB: I think the algorithm is wrong (and not very easy to maintain) and why not use a constant (with an understandable name) instead of an int value everywhere?

@manusfreedom manusfreedom changed the title All items are restricted All items are restricted in tree (Password menu) Nov 26, 2024
@Saueee
Copy link

Saueee commented Nov 27, 2024

Do you mean it looks like this?
grafik
I have the same problem.

It seems to have something to do with having multiple roles.
As long as I have only one role assigned to the user everything is fine.
If I assign more roles, everything gets restricted.

@manusfreedom
Copy link
Contributor Author

@Saueee I confirm.

@futureweb
Copy link
Contributor

I got the same Problem - almost all Passwords are shown double with one of them shown as restricted ... any ideas on how to fix this?
thx

@nilsteampassnet
Copy link
Owner

I will have a look to this

nilsteampassnet added a commit that referenced this issue Dec 4, 2024
Condition at L4355 was wrong as item with $accessLevel for a user higher to 30 indicates that user can RWDU the item.
As a consequence, the related right is 70.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants