Skip to content

Acl - #1628

Draft
pirlgon wants to merge 12 commits into
masterfrom
acl
Draft

Acl#1628
pirlgon wants to merge 12 commits into
masterfrom
acl

Conversation

@pirlgon

@pirlgon pirlgon commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@bersace bersace left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ça prend forme.


INSERT INTO application.acl (role, action, resource)
VALUES
('trn:temboard:core:group:mass/dba', '*', 'trn:temboard:core:instance:mass'),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
('trn:temboard:core:group:mass/dba', '*', 'trn:temboard:core:instance:mass'),
('trn:temboard:core:group:mass/dba', '*', 'trn:temboard:core:instance:mass/*'),

Comment thread ui/temboardui/model/queries/acl-get.sql
Comment thread ui/temboardui/model/queries/acl-insert.sql Outdated
Comment thread ui/temboardui/model/versions/014_acl.sql
Comment thread ui/temboardui/model/versions/014_acl.sql Outdated
Comment thread ui/temboardui/web/flask.py Outdated
Comment thread ui/temboardui/acl.py Outdated
return [TRN("*", "*", "*")]


def configure_authorization(role=None, action=None, resource=None):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Où est-ce utilisé ?

Je ne vois pas l'intérêt. Autant passer directement en paramètre à check_acl().

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comme check() est ajouté au before_request de flask, il ne me semble pas possible de lui passer des param, j'ai donc créé un décorateur pour impacter le test d'authorization sur une route en particulier, ce n'est aps utilisé pour le moment. Je peux le supprimer mais en fait je peux également supprimer les parametres de check(). Pour le moment on utilise toujours anonymous ou g.current_user comme role et g.instance ou * pour la resource.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

j'ai supprimé le décorateur on verra si le besoin s'en fait sentir.

@pirlgon
pirlgon force-pushed the acl branch 4 times, most recently from dde5737 to dbf480c Compare July 16, 2026 12:47
@pirlgon pirlgon changed the title WIP: Acl Acl Jul 22, 2026
@pirlgon
pirlgon force-pushed the acl branch 3 times, most recently from 02d3e4a to 81d386a Compare July 28, 2026 09:51
Comment thread ui/temboardui/model/versions/014_acl.sql
Comment thread ui/temboardui/acl.py
Comment thread ui/temboardui/acl.py Outdated
Comment thread ui/tests/unit/test_acl.py Outdated
Comment thread ui/temboardui/acl.py Outdated
Comment thread ui/temboardui/acl.py Outdated
Comment thread ui/tests/unit/test_acl.py
Comment thread ui/tests/unit/test_acl.py Outdated
Comment on lines +43 to +47
assert str(parents[0]) == "*"
assert str(parents[1]) == "trn:temboard:core:user:alice"
assert str(parents[2]) == "trn:temboard:core:user:*"
assert str(parents[3]) == "trn:temboard:core:*:*"
assert str(parents[4]) == "trn:temboard:*:*:*"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I feels like the order of parents is reversed, starting from index 1.

This would look more natural:

    assert str(parents[0]) == "*"
    assert str(parents[4]) == "trn:temboard:*:*:*"
    assert str(parents[3]) == "trn:temboard:core:*:*"
    assert str(parents[2]) == "trn:temboard:core:user:*"
    assert str(parents[1]) == "trn:temboard:core:user:alice"

Comment on lines +194 to +195
groups=[g.name for g in self.groups if g.environment],
environments=[g.environment.name for g in self.groups if g.environment],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it related to current commit?

Comment thread ui/temboardui/model/orm.py Outdated
@pirlgon
pirlgon force-pushed the acl branch 3 times, most recently from 7bf2132 to ea8ce84 Compare August 25, 2026 09:39
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.

3 participants