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

Unable to add or remove "Restricted To" users - possible OAuth interaction #4462

Open
jhumphries opened this issue Nov 14, 2024 · 0 comments

Comments

@jhumphries
Copy link
Contributor

Unsure exactly the full thread of cause, but discovered a case where attempting to add a user to the "restricted to" list for an item writes the user Id to the DB entry, but then fails to display the user in future loads on the front end, and blocks ay future edits (though not deletes) to the record.

It may be related to the creation of users via oAuth, but is directly related to the otp functionality. We do not have any otp functionality active, and out otp_items table is empty. that means that this line always returns 0 rows,

INNER JOIN ' . prefixTable('items_otp') . ' AS o ON (o.item_id = i.id)

making the FE render here:

$.each(store.get('teampassItem').id_restricted_to, function(i, value) {

bomb out because there are entries in the store.get (from the db table) but not in the data.users_list (joined against otp table).

Not sure if there are additional repurcussions at this time, but current recommended fix that has been deployed is to modify the join on

INNER JOIN ' . prefixTable('items_otp') . ' AS o ON (o.item_id = i.id)

from INNER to LEFT.

jhumphries added a commit to jhumphries/TeamPass that referenced this issue Nov 14, 2024
nilsteampassnet#4462

Resolves issue working with restricted users on items when otp is not in use, possibly due to aAuth based accounts
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

1 participant