Describe the bug
On logging into git proxy (as an admin), the user's admin rights do not apply immediately. For example if you login while viewing the repositories list, the add repository button will not be visible. The issues clears up after a refresh or navigation, as the user context gets populated correctly then.
I'm fairly sure the issue is down to the imported refreshUser fn, I think its being run out of context and is failing to update the AuthProvider. On refresh of the page or navigation via a link it get populated correctly, resolving the problem. However, until you do so the user object in the context is not populated (same as for logged out users).
To Reproduce
Steps to reproduce the behavior:
- Ensure you are logged out
- Visit the repositories page and observe the lack of an 'add repository' button
- Login (as an admin user)
- Observe that the 'add repository' button is still missing
- Refresh the page and observe that the 'add repository' button appears.
Expected behavior
After login, the user's profile data is available.
Describe the bug
On logging into git proxy (as an admin), the user's admin rights do not apply immediately. For example if you login while viewing the repositories list, the add repository button will not be visible. The issues clears up after a refresh or navigation, as the user context gets populated correctly then.
I'm fairly sure the issue is down to the imported
refreshUserfn, I think its being run out of context and is failing to update the AuthProvider. On refresh of the page or navigation via a link it get populated correctly, resolving the problem. However, until you do so theuserobject in the context is not populated (same as for logged out users).To Reproduce
Steps to reproduce the behavior:
Expected behavior
After login, the user's profile data is available.