nilsteampassnet / TeamPass

Collaborative Passwords Manager
https://www.teampass.net
1.69k stars 551 forks source link

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

Open manusfreedom opened 5 days ago

manusfreedom commented 5 days ago

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?

Saueee commented 4 days ago

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 commented 4 days ago

@Saueee I confirm.