Skip to content

Commit 25b4cb4

Browse files
committed
doc
1 parent 3069bcf commit 25b4cb4

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

packages/postgres-database/src/simcore_postgres_database/models/services_tags.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,21 @@
1414
"service_key",
1515
sa.String,
1616
nullable=False,
17-
doc="Service Key Identifier",
17+
doc="Key name identifier for the service, without specifiying its versions",
1818
),
1919
sa.Column(
2020
"service_version",
2121
sa.String,
2222
nullable=False,
23-
doc="Service version",
23+
doc="Version of the service. Combined with 'service_key', it forms a unique identifier for this service.",
2424
),
2525
# Tag
2626
sa.Column(
2727
"tag_id",
2828
sa.BigInteger,
2929
sa.ForeignKey(tags.c.id, onupdate="CASCADE", ondelete="CASCADE"),
3030
nullable=False,
31+
doc="Identifier of the tag assigned to this specific service (service_key, service_version).",
3132
),
3233
# Constraints
3334
sa.ForeignKeyConstraint(

packages/postgres-database/src/simcore_postgres_database/models/tags_access_rights.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
name="fk_tag_to_group_tag_id",
2323
),
2424
nullable=False,
25-
doc="Tag unique ID",
25+
doc="References the unique identifier of the tag that these access rights apply to.",
2626
),
2727
sa.Column(
2828
"group_id",
@@ -34,30 +34,32 @@
3434
name="fk_tag_to_group_group_id",
3535
),
3636
nullable=False,
37-
doc="Group unique ID",
37+
doc="References the unique identifier of the group that has access rights to the tag.",
3838
),
3939
# ACCESS RIGHTS ---
4040
sa.Column(
4141
"read",
4242
sa.Boolean(),
4343
nullable=False,
4444
server_default=sa.sql.expression.true(),
45-
doc="If true, group can *read* a tag."
46-
"This column can be used to set the tag invisible",
45+
doc="Indicates whether the group has permission to view the tag. "
46+
"A value of 'True' allows the group to access the tag's details.",
4747
),
4848
sa.Column(
4949
"write",
5050
sa.Boolean(),
5151
nullable=False,
5252
server_default=sa.sql.expression.false(),
53-
doc="If true, group can *create* and *update* a tag",
53+
doc="Indicates whether the group has permission to modify the tag. "
54+
"A value of 'True' grants write access to the group.",
5455
),
5556
sa.Column(
5657
"delete",
5758
sa.Boolean(),
5859
nullable=False,
5960
server_default=sa.sql.expression.false(),
60-
doc="If true, group can *delete* the tag",
61+
doc="Indicates whether the group has permission to delete the tag. "
62+
"A value of 'True' allows the group to remove the tag.",
6163
),
6264
# TIME STAMPS ----
6365
column_created_datetime(timezone=False),

services/web/server/src/simcore_service_webserver/tags/_handlers.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ async def wrapper(request: web.Request) -> web.StreamResponse:
4646

4747
routes = web.RouteTableDef()
4848

49+
#
50+
# tags CRUD standard operations
51+
#
52+
4953

5054
@routes.post(f"/{VTAG}/tags", name="create_tag")
5155
@login_required
@@ -119,6 +123,11 @@ async def list_tag_groups(request: web.Request):
119123
raise NotImplementedError
120124

121125

126+
#
127+
# tags ACCESS RIGHTS is exposed as a sub-resource groups
128+
#
129+
130+
122131
@routes.post(f"/{VTAG}/tags/{{tag_id}}/groups/{{group_id}}", name="create_tag_group")
123132
@login_required
124133
@permission_required("tag.crud.*")

0 commit comments

Comments
 (0)