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

Frontend adaptions for user permissions #1036

Merged
merged 248 commits into from
Apr 14, 2022
Merged

Frontend adaptions for user permissions #1036

merged 248 commits into from
Apr 14, 2022

Conversation

TheSlimvReal
Copy link
Collaborator

@TheSlimvReal TheSlimvReal commented Oct 26, 2021

see issue: #769

Visible/Frontend Changes

--

Architectural/Backend Changes

  • Added integration for CASL
  • Added automatic fetching of rules from database
  • App re-evaluates rules whenever a new person logs in
  • Replaced config-based permission service with CASL ability
  • Refactored to one local database per user
  • Added service that resets database when user lost permissions

TheSlimvReal and others added 30 commits September 9, 2021 15:09
Copy link
Member

@sleidig sleidig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New changes look good. Thanks for the further code (and especially test) cleanups 😊


The small issue with local session mode seems at least less severe for me at the moment:

  1. creating local demo data with "demo" login
  2. logging out and logging in as "demo-admin"
  3. (!) immediately after login I get a "demo-admin" entity not found warning in console on list views, this does resolve after some waiting/navigating however and all other data seems fine

I assume the "migration" from one local user db to the other does not block login and may just take a second until the user object (and other data) is available.

We can't support continuous updates between various users in local mode, can we? As this is just developer mode I wouldn't invest time on it at the moment, though.


Good to go in my eyes!

src/app/core/session/session-service/local-session.ts Outdated Show resolved Hide resolved
TheSlimvReal and others added 18 commits April 9, 2022 10:09
Co-authored-by: Sebastian <[email protected]>
# Conflicts:
#	src/app/child-dev-project/attendance/activity-attendance-section/activity-attendance-section.component.spec.ts
#	src/app/child-dev-project/attendance/activity-attendance-section/activity-attendance-section.stories.ts
#	src/app/child-dev-project/notes/note-details/note-details.component.html
#	src/app/core/database/pouch-database.spec.ts
#	src/app/core/database/pouch-database.ts
#	src/app/core/demo-data/demo-data.service.ts
#	src/app/core/entity-components/entity-form/entity-form.service.spec.ts
#	src/app/features/historical-data/historical-data/historical-data.stories.ts
#	src/app/utils/di-tokens.ts
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@TheSlimvReal TheSlimvReal merged commit d3ff1b7 into master Apr 14, 2022
@TheSlimvReal TheSlimvReal deleted the backend-testing branch April 14, 2022 09:08
@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.4.0-master.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@aam-digital-ci
Copy link
Collaborator

🎉 This PR is included in version 3.4.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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 this pull request may close these issues.

4 participants