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

Multi-store: check if the current user an owner of the specified store #17

Closed
gdlcf88 opened this issue Apr 29, 2020 · 1 comment
Closed
Assignees
Milestone

Comments

@gdlcf88
Copy link
Member

gdlcf88 commented Apr 29, 2020

Related to #68

Use IStoreOwnerStore to check whether the user is one of the store owners, if so, he has the authority.

For example:

// Todo: Check if current user is an admin of the store.
var isCurrentUserStoreAdmin = true && await AuthorizationService.IsGrantedAsync(ProductsPermissions.Products.Default);

should be:

var isStoreOwner = await _storeOwnerStore.IsOwnerAsync(CurrentUser.GetId(), input.StoreId)
    && await AuthorizationService.IsGrantedAsync(ProductsPermissions.Products.Default);
@gdlcf88 gdlcf88 changed the title Judge the management authority of current user to specified store Multi-store: Judge the management authority of current user to specified store Apr 29, 2020
@gdlcf88 gdlcf88 changed the title Multi-store: Judge the management authority of current user to specified store Multi-store: check the permission of the current user to the specified store Jul 30, 2020
@gdlcf88 gdlcf88 changed the title Multi-store: check the permission of the current user to the specified store Multi-store: check if the current user an owner of the specified store Jul 30, 2020
@gdlcf88 gdlcf88 added this to the 1.0.0 milestone Jul 30, 2020
@gdlcf88 gdlcf88 self-assigned this Jul 30, 2020
@gdlcf88
Copy link
Member Author

gdlcf88 commented Aug 25, 2020

This issue will be resolved when the #68 is finished.

@gdlcf88 gdlcf88 closed this as completed Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant