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

registries: Add tests for Unauthorized Operation #537

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

muditDhiway
Copy link
Contributor

Fixes: #535


// delegate has ADMIN permission and not ASSERT
assert_err!(
Registries::ensure_authorization_origin(&delegator_id, &delegate),
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be delegate_authorization_id?

&[&registry_id.encode()[..], &delegate.encode()[..], &creator.encode()[..]].concat()[..],
);

let delegator_id: AuthorizationIdOf = generate_authorization_id::<Test>(&delegator_id_digest);
Copy link
Member

Choose a reason for hiding this comment

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

Naming this as delegate_auth_id would be more readable, as this belongs to a delegate and not to a delegator.
Similar to other places as well.
Delegator is the one who will delegate others.

vatsa287
vatsa287 previously approved these changes Dec 21, 2024
Copy link
Member

@vatsa287 vatsa287 left a comment

Choose a reason for hiding this comment

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

LGTM

@amarts
Copy link
Member

amarts commented Jan 2, 2025

one more file with conflict :-/

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.

Registries: Add tests for UnauthorizedOperation
3 participants