Skip to content

Commit

Permalink
feat: Name project roles consistently
Browse files Browse the repository at this point in the history
Use the following names consistently across frontend and documentation:
- Project Administrator
- Project User
- Global Administrator
  • Loading branch information
MoritzWeber0 committed Sep 9, 2024
1 parent 6b57058 commit be61fe2
Show file tree
Hide file tree
Showing 46 changed files with 730 additions and 433 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ multiple organizations. Here are some of the key features:
- Single sign-on (SSO) via [OAuth2](https://oauth.net/2/)
- No need to install or maintain local Capella clients - clients are made on
demand in an underlaying [Kubernetes](https://kubernetes.io/) cluster
- Access to projects and models is self-managed by project leads, model owners
- Access to projects and models is self-managed by project admins, model owners
or delegates
- Within a project a user could have read or read & write access. Read-only
users don't consume licenses in Team for Capella projects.
Expand Down Expand Up @@ -60,7 +60,7 @@ In addition, we have integrated commercial products:

- [pure::variants](https://www.pure-systems.com/purevariants)
- Automatic license injection
- Access to licenses is self-managed by project leads
- Access to licenses is self-managed by project admins

We've prepared a small video, where we showcase the diagram cache feature and
show how you can use Capella and Jupyter in split view in the browser:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self):
title="Insufficient Gitlab API access scope",
reason=(
"The registered token has not enough permissions to access the Gitlab API. "
"Access scope 'read_api' is required. Please contact your project lead."
"Access scope 'read_api' is required. Please contact your project administrator."
),
err_code="GITLAB_ACCESS_DENIED",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ async def get_revisions_of_primary_git_model(
],
)
async def get_revisions_with_model_credentials(
url: str = fastapi.Body(),
url: str = fastapi.Body(media_type="text/plain"),
git_model: models.DatabaseGitModel = fastapi.Depends(
injectables.get_existing_git_model
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
injectables as toolmodels_injectables,
)
from capellacollab.projects.toolmodels import models as toolmodels_models
from capellacollab.projects.users import models as projects_users_models
from capellacollab.users import models as users_models

from . import crud, exceptions, injectables, models

router = fastapi.APIRouter(
dependencies=[
fastapi.Depends(
auth_injectables.ProjectRoleVerification(
required_role=projects_users_models.ProjectUserRole.ADMIN
auth_injectables.RoleVerification(
required_role=users_models.Role.ADMIN
)
)
],
Expand Down
4 changes: 2 additions & 2 deletions backend/capellacollab/projects/users/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ def __init__(self):
super().__init__(
status_code=status.HTTP_403_FORBIDDEN,
err_code="PERMISSION_FOR_PROJECT_LEADS_NOT_ALLOWED",
title="Permission for project leads not allowed",
title="Permission for project administrator not allowed",
reason=(
"Project leads can't be given permissions. "
"Project administrators can't be given permissions. "
"They already have full access to the project."
),
)
9 changes: 8 additions & 1 deletion backend/capellacollab/projects/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import enum
import typing as t

import pydantic
import sqlalchemy as sa
from sqlalchemy import orm

Expand Down Expand Up @@ -35,7 +36,13 @@ class ProjectUser(core_pydantic.BaseModel):


class PostProjectUser(core_pydantic.BaseModel):
role: ProjectUserRole
role: ProjectUserRole = pydantic.Field(
description=(
"The role of the user in the project. "
"Can be 'user' or 'manager'. Manager is also referred "
"to as project administrator in the documentation."
)
)
permission: ProjectUserPermission
username: str
reason: str
Expand Down
2 changes: 1 addition & 1 deletion backend/capellacollab/projects/users/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def update_project_user(
],
)
def remove_user_from_project(
reason: str = fastapi.Body(),
reason: str = fastapi.Body(media_type="text/plain"),
project: projects_models.DatabaseProject = fastapi.Depends(
projects_injectables.get_existing_project
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def __init__(self):
title="Error while accessing the Git repository",
reason=(
"There was an error accessing the model. "
"Please ask your project lead for more information. "
"Please ask your project administrator for more information. "
"In most cases, the credentials need to be updated."
),
err_code="GIT_REPOSITORY_ACCESS_ERROR",
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/development/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ subsections:
</tr>
<tr>
<td><b>/admin</b></td>
<td>Administrator documentation</td>
<td>System Administrator documentation</td>
<td>For System administrators and businesses, who are interested in administering their own instances.</td>
</tr>
<tr>
Expand Down
12 changes: 6 additions & 6 deletions docs/docs/user/projects/access/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

# How do I Get Access to a Project?

Please ask a [project lead](../roles.md) of the specific project for access.
The project lead can add you as user to the project. After you've been added,
you should have direct access. If you don't see the project yet, just reload
the page with `F5`.
Please ask a [project administrator](../roles.md) of the specific project for
access. The project administrator can add you as user to the project. After
you've been added, you should have direct access. If you don't see the project
yet, just reload the page with `F5`.

Before a project lead can add you to a project, you have to log in once. The
first login automatically registers your user in the database.
Before a project administrator can add you to a project, you have to log in
once. The first login automatically registers your user in the database.

Your project manager can find more information here:
[Add a user to a project](../add-user/index.md)
Expand Down
5 changes: 3 additions & 2 deletions docs/docs/user/projects/add-user/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

!!! warning

You need to have the Administrator or Project Lead role for a
You need to have the administrator or project administrator role for a
project to perform the following steps.

## Add User to Project
Expand Down Expand Up @@ -37,7 +37,8 @@
You can select from the following options:

- Remove a user from the project
- Set role of the user to [project lead](../../projects/roles.md) or
- Set role of the user to
[project administrator](../../projects/roles.md) or
[user](../../projects/roles.md)
- Set permission of the user to
[read/write](../../sessions/types/index.md) or
Expand Down
11 changes: 6 additions & 5 deletions docs/docs/user/projects/create/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@

In the Collaboration Manager, you can follow a guided process to create
projects. Any user can create a project. After creation, you get the role
[project lead](../../projects/roles.md) for the project. To create a project,
go to the _Projects_ tab of the navigation bar, and click on _Add new project_.
[project administrator](../../projects/roles.md) for the project. To create a
project, go to the _Projects_ tab of the navigation bar, and click on _Add new
project_.

Please follow the steps:

Expand All @@ -21,9 +22,9 @@ changed! Additionally, you may want to add a description.

## Step 2: Add Team Members

This page allows to manage the project user. By default, you are project lead
of the project. If you don't want to add an additional user, you can skip this
step. Users can be added later at any time.
This page allows to manage the project user. By default, you are project
administrator of the project. If you don't want to add an additional user, you
can skip this step. Users can be added later at any time.

![Step 2: Team members](./step-2.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/user/projects/models/backups/remove.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

!!! warning

Only administrators and project leads can remove pipelines.
Only global administrators and project administrators can remove pipelines.

1. Select the project in the `Projects` overview.
1. In the model overview, select the `Synchronize`-button
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/user/projects/models/backups/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

!!! warning

You need to have the Administrator or Project Lead role for a
You need to have the global administrator or project administrator role for a
project to perform the following steps.

!!! danger
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/user/projects/models/complexity_badge.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

- A file called `model-complexity-badge.svg` has to exist in the repository.
We provide a Gitlab CI template and a Github action to generate the file. Find more information below.
- Only project leads can set up the model complexity badge. In addition, one needs access to the Git repository of the model.
- Only project administrators can set up the model complexity badge. In addition, one needs access to the Git repository of the model.

1. To set up the model complexity badge, you need to add the Git API URL to
your Git instance. More information
Expand Down
23 changes: 12 additions & 11 deletions docs/docs/user/projects/models/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
# Create a _Collaboration Manager_ Model

We offer a guided process to create models in a project. To create a model, you
have to be at least [project lead](../../projects/roles.md). If you're coming
from project creation, you're ready to go. Otherwise, please navigate to the
_Projects_ tab of the navigation bar, open the project in which you want to
have to be at least [project administrator](../../projects/roles.md). If you're
coming from project creation, you're ready to go. Otherwise, please navigate to
the _Projects_ tab of the navigation bar, open the project in which you want to
create a model, and click on the “+” icon.

The creation can be interrupted at any step, however an unfinished model will
Expand All @@ -30,14 +30,15 @@ following options:
1. Create a new **Git** repository. This option is not supported yet. Please
create the repository yourself and continue with the first option.
1. Link a **TeamForCapella** repository. Only available for the `Capella` tool.
If you're project lead and not administrator, you are not able to select
this option. You'll need assistance by an administrator. You can abort the
process here and continue with the help of an administrator later on.
If you're project administrator and not global administrator, you are not
able to select this option. You'll need assistance by an administrator. You
can abort the process here and continue with the help of an administrator
later on.
1. Create a **TeamForCapella** repository. Only available for the `Capella`
tool. If you're project lead and not administrator, you are not able to
select this option. You'll need assistance by an administrator. You can
abort the process here and continue with the help of an administrator later
on.
tool. If you're project administrator and not global administrator, you are
not able to select this option. You'll need assistance by an administrator.
You can abort the process here and continue with the help of an
administrator later on.

## Step 3: Add Source

Expand Down Expand Up @@ -84,7 +85,7 @@ You have to enter the following information:

The credentials should be scoped and should only work for the required
repository. When changing the repository URL and the credentials are not
changed, other project leads can gain access to different repositories
changed, other project administrators can gain access to different repositories
with your token.

### Step 3.2 Link Existing T4C Repository
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/user/projects/roles.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ Projects are self-managed. There are different roles for this:
<th>Permissions</th>
</tr>
<tr>
<td>`Administrator`</td>
<td>`Global Administrator`</td>
<td>
:material-check-all: All permissions <br>
:material-check: Manage TeamForCapella instances <br>
:material-check: Manage TeamForCapella repositories <br>
:material-check: Manage Git repositories</td>
</tr>
<tr>
<td>`Project lead`</td>
<td>`Project administrator`</td>
<td>
:material-check: Manage users of a project <br>
:material-check: Manage model sources <br>
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/user/sessions/troubleshooting/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
<span id="modelloading-failed" />

This happens if the loading of one of the models fails.
Please reach out your project lead. If you are project lead, please check
Please reach out your project administrator. If you are project administrator, please check
the primary Git models with a matching tool version of your project.
These are used for the `read-only` session. Common mistakes are wrong
credentials, wrong entrypoints (e.g. with typos) and missing `aird`-files.

If you have no success, please reach out your administrator. Administrators
If you have no success, please reach out your global administrator. They
can see the logs of read-only sessions.

<!-- prettier-ignore -->
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/user/tools/capella/troubleshooting/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
reported to the Eclipse Capella team directly in the
[Github repository](https://github.com/eclipse/capella/issues).

Administrators can see the logs of all sessions to identify the issues
Global administrators can see the logs of all sessions to identify the issues
remotely. In addition, the session owner can also see the events in the UI.
In your session, please follow these steps:

Expand Down
2 changes: 1 addition & 1 deletion docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ nav:
- api/swagger.md
- api/redoc.md
- api/openapi.md
- Administrator Documentation:
- System Administrator Documentation:
- Introduction: admin/index.md
- Installation: admin/installation.md
- Authentication:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<div class="dialog">
<form [formGroup]="form" (submit)="onSubmit()">
<h2>{{ data.title }}</h2>
<h2 class="text-xl font-medium">{{ data.title }}</h2>
<p>{{ data.text }}</p>

<mat-form-field class="my-2 w-full" appearance="fill">
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/src/app/openapi/api/projects.service.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions frontend/src/app/openapi/model/post-project-user.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<span class="model-complexity-error-text"
><b>Error loading the complexity badge.</b> <br />{{
errorMessage ||
"Please ask your project lead or administrator for help."
"Please ask your project administrator or global administrator for help."
}}</span
>
</div>
Expand Down
Loading

0 comments on commit be61fe2

Please sign in to comment.