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

Implement communities creation & members sync #30

Open
2 of 4 tasks
mirekys opened this issue Jan 29, 2021 · 0 comments
Open
2 of 4 tasks

Implement communities creation & members sync #30

mirekys opened this issue Jan 29, 2021 · 0 comments

Comments

@mirekys
Copy link
Member

mirekys commented Jan 29, 2021

Related #27

For CESNET repositories, we will need to to create communities (mapped to VOs/Perun groups)
sync community members and its roles in a community with data from Perun.

For new VOs/groups requesting a repository community, the procedure would be following:

  1. In Perun, create the main group for the repository community, note the UUID of the created group (this would map to the all members Invenio community role)
  2. In Perun, create subgroups for each specialized community role (curator, publisher) inside the main Perun group, note the UUIDs for each role group
  3. On the repository, call the following CLI command to initialize the community:
invenio oarepo:communities create --help
Usage: invenio oarepo:communities create [OPTIONS] COMMUNITY_ID TITLE

Options:
  --description TEXT  Community description
  --policy TEXT       Curation policy
  --logo-path TEXT    Path to the community logo file
  --ctype TEXT        Type of a community
  --help              Show this message and exit.
  1. Wait for Perun export to push group members configuration to be synced with community members

Tasks

  • Create DB table to hold Community to Perun UUID group mappings

  • Create CLI command to create the community as described in the scenario above. It should also create Invenio Roles named:

    • community:$community_id:member
    • community:$community_id:curator
    • community:$community_id:publisher
  • Create repository API endpoints to handle GET /community/<code>/members and PATCH /community/<code>/members

  • Create a service that parses Perun users_export and creates a PATCH request using the APIs from previous step, the request body would be looking like:

[{
  "group": "<uuid>",
  "op": "add|remove",
  "user": { "id": "<uniqPersistentID>", "first_name": "<fn>", "last_name": "<ln>", "email": "<email>"}
}]
@mirekys mirekys added this to To do in Development via automation Jan 29, 2021
@mirekys mirekys moved this from To do to In progress in Development Feb 1, 2021
@mirekys mirekys self-assigned this Jun 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development
  
In progress
Development

No branches or pull requests

1 participant