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

Permission ticks disappear from UI #977

Closed
1 task done
XcrossD opened this issue Apr 20, 2018 · 26 comments
Closed
1 task done

Permission ticks disappear from UI #977

XcrossD opened this issue Apr 20, 2018 · 26 comments
Assignees
Labels
issue: bug Issue reporting a bug severity: high If it breaks the basic use of the product status: can not reproduce Not enough information to reproduce

Comments

@XcrossD
Copy link
Contributor

XcrossD commented Apr 20, 2018

Informations

  • Node.js version:
    9.8.0
  • npm version:
    5.6.0
  • Strapi version:
    alpha.12
  • Database:
    mongodb
  • Operating system:
    windows 10

What is the current behavior?
Permissions in public role can be saved, but does not reflect on UI.

Steps to reproduce the problem
Tick desired route, save, ticks disappeared.
recording1

What is the expected behavior?
Permissions should persist after save.

Suggested solutions

  • I'm sure that this issue hasn't already been referenced
@lauriejim lauriejim self-assigned this Apr 20, 2018
@lauriejim lauriejim added issue: bug Issue reporting a bug severity: high If it breaks the basic use of the product status: have to reproduce labels Apr 20, 2018
@lauriejim
Copy link
Contributor

Thank for issue reporting. Will take a look.

@Aurelsicoko Aurelsicoko assigned Aurelsicoko and unassigned lauriejim Apr 23, 2018
@Aurelsicoko
Copy link
Member

@XcrossD Can you give us the MongoDB version? Are you using a hosted database? The requests seem pretty slow... I can't reproduce this on my machine, I need more information.

@Aurelsicoko Aurelsicoko added status: can not reproduce Not enough information to reproduce and removed status: have to reproduce labels Apr 23, 2018
@XcrossD
Copy link
Contributor Author

XcrossD commented Apr 24, 2018

@Aurelsicoko Hosted with mLab. From the dashboard - mongod version: 3.4.14. Happy to provide more information.

Actually the route permissions have been saved, it's just after 1 second the saved route permissions disappeared.

@Aurelsicoko
Copy link
Member

@XcrossD I tried with mLab and the exact same models (Banner and ProductFeature)... I can't reproduce your issue. Do you have more models? Can you try with a fresh app?

@XcrossD
Copy link
Contributor Author

XcrossD commented Apr 24, 2018

@Aurelsicoko
api.zip
I will test a fresh app later and let you know.

@XcrossD
Copy link
Contributor Author

XcrossD commented Apr 24, 2018

Fresh install shows the same. I could DM you my server details on slack for further testing.

@Aurelsicoko
Copy link
Member

Thank, I just tried and it works fine on my machine again... Are you still running the app on Windows?

@XcrossD
Copy link
Contributor Author

XcrossD commented Apr 24, 2018

Yes running on windows

@soorur
Copy link

soorur commented Apr 30, 2018

Same bug, running also on Windows :D

@Aurelsicoko
Copy link
Member

@XcrossD @soorur Which browser are you using?

@XcrossD
Copy link
Contributor Author

XcrossD commented May 1, 2018 via email

@soorur
Copy link

soorur commented May 1, 2018

Latest Chrome as well - funny thing is it only reproduces for the first entity in the permission list

@Aurelsicoko
Copy link
Member

@XcrossD @soorur Can you make sure that you have the permissions to write in the collection users-permissions? Because @XcrossD I'm able to reproduce the issue with the database you sent me in DM. I can't reproduce this with mine (local and hosted).

@XcrossD
Copy link
Contributor Author

XcrossD commented May 2, 2018

@Aurelsicoko I didn't do anything extra in mLab after following this tutorial. I think by default on mLab I have write permission? I don't see where I can set write permissions for individual collections either. As I mentioned before, the route permissions are saved. If I don't have write permission, how can the route permissions be saved? Maybe this is an issue on mLab only? But then again @soorur might be using a local database.

@XcrossD
Copy link
Contributor Author

XcrossD commented May 2, 2018

@Aurelsicoko Also before you said it was running fine after I gave you the mLab. What is causing the difference now?

@Aurelsicoko
Copy link
Member

The issue was due to permissions duplication, I made a PR to fix it (#1103)

@lauriejim lauriejim added this to the 3.0.0-alpha.12.2 milestone May 3, 2018
@XcrossD
Copy link
Contributor Author

XcrossD commented May 4, 2018

@Aurelsicoko Weird, I just updated to 12.1.2 and this issue still persists. I see some permissions are ticked, some are not, so I tick those that are unticked and save, but only those that were originally ticked are visible. Is it helpful to know which ones are problematic?
Unticked: contact productfeature banner homeslideshow customer

@XcrossD
Copy link
Contributor Author

XcrossD commented May 4, 2018

Nevermind, I saw it's going to roll out in the next update. Although I'd like to come out sooner though.

@ashbrener
Copy link

ashbrener commented May 30, 2020

I am experiencing this issue 2yrs later on our production MongoDB (compose.io). Strapi v3.0.0-beta.20.3

@virtualkitchenco
Copy link

We also lost the permission on some of the public apis. We are using dockerized version of Strapi v3.0.0-beta.14.

@ashbrener
Copy link

ashbrener commented Jun 2, 2020

@virtualkitchenco this resolved the issue for us:

  1. Upgraded to Strapi 3.0.1
  2. Deleted the users-permissions-permissions collection in MongoDB
  3. Restarted Strapi
  4. Reassigned all permissions

The underlying issue is that for some reason Strapi allowed the creation of duplication role permissions in that collection with enabled=false properties overwriting the previous permissions with enabled=true.

@virtualkitchenco
Copy link

Is there a way to fix this without upgrading to 3.0.1? Currently using Strapi v3.0.0-beta.20 @ashbrener

@ashbrener
Copy link

Have you tried simply deleting the users-permissions-permissions collection and restarting ?

@lvargas0584
Copy link

hi guys, i having the same problem.
Any one fixed that?
I'm using Strapi v 3.2.1

@derrickmehaffy
Copy link
Member

hi guys, i having the same problem.
Any one fixed that?
I'm using Strapi v 3.2.1

Please test on the latest release, we do not debug issues on older versions

@lvargas0584
Copy link

hi guys, i having the same problem.
Any one fixed that?
I'm using Strapi v 3.2.1

Please test on the latest release, we do not debug issues on older versions

Thanks, I will do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug severity: high If it breaks the basic use of the product status: can not reproduce Not enough information to reproduce
Projects
None yet
Development

No branches or pull requests

7 participants