IronCoreLabs / ironhide

Tool to easily encrypt and decrypt files to users and groups. Similar to GPG, but usable at scale.
GNU Affero General Public License v3.0
44 stars 6 forks source link

Fix error when trying to display info about a file that is also shared with a group the user is not a member/admin of #32

Open BobWall23 opened 4 years ago

BobWall23 commented 4 years ago

If a user has access to a file that is encrypted to a group that they are not a part of via

ironhide file:info file.iron

Then they get an error that says:

Error: Cannot read property 'groupName' of undefined

This is because we had previously assumed that the user is always in the groups that comes back in the document visibility list. This changed at some point in the past so now it also returns the IDs of the groups that the user is not a member/admin of.

Best idea to fix this is to just omit the groups in the table that the user is not part of.