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

Permission target #365

Open
IvanTurgenev1 opened this issue Aug 26, 2022 · 1 comment
Open

Permission target #365

IvanTurgenev1 opened this issue Aug 26, 2022 · 1 comment
Labels
Feedback needed Additional information is required to proceed

Comments

@IvanTurgenev1
Copy link

Is it possible to create permission templates?
i'm trying to do it like :
artifactory_ = ArtifactoryPath(
f"https://art/artifactory/", token=art_token, verify=False)
permission = artifactory_.find_permission_target(f"{repo_name}")
if permission is None:
permission = PermissionTarget.create(artifactory_)
but getting exception:
f"Create {self.class.name} [{getattr(self, self.resource_name)}]"

@donhui
Copy link
Contributor

donhui commented Aug 29, 2022

The correct code shoud be:

artifactory_ = ArtifactoryPath(
    f"https://art/artifactory/", token=art_token, verify=False)
permission = artifactory_.find_permission_target(f"{repo_name}")
if permission is None:
    permission = PermissionTarget(artifactory_, f"{repo_name}").create()

@allburov allburov added the Feedback needed Additional information is required to proceed label Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback needed Additional information is required to proceed
Development

No branches or pull requests

3 participants