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

Extract Groups management from HomeDBManager #1342

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

fflorent
Copy link
Collaborator

@fflorent fflorent commented Dec 13, 2024

Context

I pave the way to implement Groups for SCIM.

Proposed solution

Refactoring for moving the Groups Management outside of HomeDBManager.

Related issues

#870

Has this been tested?

  • 👍 yes, I added tests to the test suite
  • 💭 no, because this PR is a draft and still needs work
  • 🙅 no, because this is not relevant here (no methods are used elsewhere than in lib/homedb)
  • 🙋 no, because I need help

@fflorent fflorent marked this pull request as ready for review December 13, 2024 13:04
Copy link
Member

@paulfitz paulfitz left a comment

Choose a reason for hiding this comment

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

Looks like a straightforward refactor. One tiny comment, then I think it is good.

import { Organization } from "app/gen-server/entity/Organization";
import { Workspace } from "app/gen-server/entity/Workspace";
import { Document } from "app/gen-server/entity/Document";
import { AclRule } from "app/gen-server/entity/AclRule";
Copy link
Member

Choose a reason for hiding this comment

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

Ideally imports are ordered alphabetically, and use of quotes are consistent. Sorry we don't have automatic linting for this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@paulfitz I am never really sure about how to sort the imports. How should we sort this line:
import { GroupDescriptor, NonGuestGroup, Resource } from "app/gen-server/lib/homedb/Interfaces";

Should we consider the imported object (GroupDescriptor) or the path ("app/gen-server/lib/homedb/Interfaces") for sorting?

Copy link
Member

Choose a reason for hiding this comment

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

The path

@paulfitz paulfitz merged commit 793f0ee into gristlabs:main Dec 13, 2024
11 checks passed
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.

2 participants