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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug: User permissions on base get reset #7902

Closed
1 task done
rogoersTPH opened this issue Mar 19, 2024 · 7 comments 路 Fixed by #7904
Closed
1 task done

馃悰 Bug: User permissions on base get reset #7902

rogoersTPH opened this issue Mar 19, 2024 · 7 comments 路 Fixed by #7904

Comments

@rogoersTPH
Copy link

Please confirm if bug report does NOT exist already ?

  • I confirm there is no existing issue for this

Steps to reproduce ?

We are facing a strange bug and so far also struggle to clearly reproduce it.
What seems to happen is that one of our users loses access to a base.

Here are the permissions as they have been set up:
nocodb_user_perms_ok

From time to time, the user in question faces this error
screenshot_2024-03-18_at_10 50 31
Or is able to access the base and the tables included but cannot see any values.

On the admin side, we can see that when this happens, all user permissions seem to get set to "No Access"
nocodb_user_perms

Strangely, the permissions of the user in question are still at "Editor" and the "Date joined" is reset.

What we tried so far:

  • The user logs out, deletes the cookies and logs in again.
    • This works sometimes, but not always.
  • Restarting the docker containers with NocoDB, PostgreSQL and Redis.
    • Again, this does not work reliably.
  • Changing the permissions to another level and then back to "Editor".
    • This did not have an effect.

When I (admin) log out and in again, the permissions are at least displayed correctly again. It seems that this behavior is actually triggered when the user connects but we will investigate this a bit further to be sure.

Desired Behavior

Permissions should stick and not change without manual intervention.

Project Details

Node: v20.11.1
Arch: x64
Platform: linux
Docker: true
RootDB: pg
PackageVersion: 0.204.5

Attachments

No response

@o1lab
Copy link
Member

o1lab commented Mar 19, 2024

Do you suspect this happens - when you add a new user the permissions are changing?

@rogoersTPH
Copy link
Author

All users were invited/joined approx. 2 months ago.
I will try to add a new dummy user and see if the permissions stick.

My first suspicion was that this was caused because we renamed the database.

We had a base "Main" where we started at. After a couple of weeks, we realized that we need to change the layout.
Thus, we created a new base "Main 2.0" with the new layout and moved the users one by one to the new layout (means giving them "Editor" access and fill in the data). After everybody moved, I renamed the old "Main" base to "Main_old" and the new "Main 2.0" to "Main". Then, all permissions in the "Main_old" got set to "No Access".

I thought it could be that because we use the old name for the new base, the permissions got somehow mixed up. However, I deleted the old base and the behavior is still there.

Are there any logs I can look at? The logs of the NocoDB docker container look fine. No errors or similar.

@rogoersTPH
Copy link
Author

rogoersTPH commented Mar 19, 2024

@o1lab

Do you suspect this happens - when you add a new user the permissions are changing?

I created a dummy user (via Team & Settings -> Users Management -> Invite User), gave it "Editor" permissions and indeed, on my admin account the permissions change to "No Access" as long as the dummy user is logged in. As soon as I log the dummy user out, the permissions are restored to the original ones on the admin account.
However, the dummy user can make edits according to the set permissions.

@rogoersTPH
Copy link
Author

Thanks a lot for the quick fix and the new release. I deployed it yesterday and so far, the permissions stay the way they should.

Our user still needs to reload the page twice before she can see all contents of cells but this might be due to the browser(s) used. She is also the only one using a Mac.

@pranavxc
Copy link
Member

Thanks a lot for the quick fix and the new release. I deployed it yesterday and so far, the permissions stay the way they should.

Our user still needs to reload the page twice before she can see all contents of cells but this might be due to the browser(s) used. She is also the only one using a Mac.

It may be related to some old UI cache. To clarify, does it happens always or just once ?

@rogoersTPH
Copy link
Author

Yesterday it was reproducible on her Mac using Chrome and Safari.
I don't have a screenshot available, but the UI is not rendered completely. The sidebar is fully visible and the bases and tables are selectable. She can also change tables or bases but the main window or frame does not finish rendering, thus the content of rows is not visible. However, the rows are selectable and can be opened and then also edited.
Refreshing the browser window leads to a normally rendered page.

I asked if she could try different browsers or devices, delete cookies/cache to see if this a browser issue.

@pranavxc
Copy link
Member

Yesterday it was reproducible on her Mac using Chrome and Safari. I don't have a screenshot available, but the UI is not rendered completely. The sidebar is fully visible and the bases and tables are selectable. She can also change tables or bases but the main window or frame does not finish rendering, thus the content of rows is not visible. However, the rows are selectable and can be opened and then also edited. Refreshing the browser window leads to a normally rendered page.

I asked if she could try different browsers or devices, delete cookies/cache to see if this a browser issue.

If facing the same issue again then take a screenshot, check browser console for any error and share it with us.

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

Successfully merging a pull request may close this issue.

3 participants