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

Feature/enterprise#362 - Add can_create() api #1390

Merged
merged 4 commits into from
Jun 17, 2024

Conversation

trgiangdo
Copy link
Member

Resolves https://github.com/Avaiga/taipy-enterprise/issues/362

This PR adds taipy.can_create() API to check if a DataNodeConfig or a ScenarioConfig can be created via taipy.create_scenario() or taipy.create_global_data_node() and return a Reasons object

Copy link
Contributor

github-actions bot commented Jun 11, 2024

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
18597 16225 87% 0% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
taipy/config/_serializer/_base_serializer.py 96% 🟢
taipy/core/data/_data_manager.py 97% 🟢
taipy/core/reason/_reason_factory.py 93% 🟢
taipy/core/scenario/_scenario_manager.py 98% 🟢
taipy/core/taipy.py 88% 🟢
TOTAL 94% 🟢

updated for commit: dd7f4fe by action🐍

taipy/core/reason/_reason_factory.py Outdated Show resolved Hide resolved
taipy/core/reason/_reason_factory.py Show resolved Hide resolved
taipy/core/reason/_reason_factory.py Outdated Show resolved Hide resolved
taipy/core/taipy.py Outdated Show resolved Hide resolved
tests/core/data/test_data_manager.py Outdated Show resolved Hide resolved
tests/core/data/test_data_manager.py Show resolved Hide resolved
taipy/core/data/_data_manager.py Show resolved Hide resolved
taipy/core/taipy.py Outdated Show resolved Hide resolved
jrobinAV
jrobinAV previously approved these changes Jun 13, 2024
taipy/core/data/_data_manager.py Show resolved Hide resolved
taipy/core/reason/_reason_factory.py Show resolved Hide resolved
taipy/core/taipy.py Outdated Show resolved Hide resolved
taipy/core/taipy.py Outdated Show resolved Hide resolved
tests/core/data/test_data_manager.py Show resolved Hide resolved
@trgiangdo
Copy link
Member Author

@FredLL-Avaiga @jrobinAV The taipy.can_create() now accepts the config as an optional parameter.

So with enterprise, taipy.can_create() without any parameter will check if the user has sufficient role to create entities

@trgiangdo trgiangdo requested a review from jrobinAV June 14, 2024 04:12
Copy link
Member

@jrobinAV jrobinAV left a comment

Choose a reason for hiding this comment

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

The implementation is tricky, but I like it.

@trgiangdo trgiangdo merged commit 30832d4 into develop Jun 17, 2024
153 checks passed
@trgiangdo trgiangdo deleted the feature/enterprise#362-add-can_create-api branch June 17, 2024 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants