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

Non Admins can't add learnpress orders (manual) #591

Open
gocallum opened this issue Feb 17, 2025 · 0 comments
Open

Non Admins can't add learnpress orders (manual) #591

gocallum opened this issue Feb 17, 2025 · 0 comments

Comments

@gocallum
Copy link

My goal is to create a role who has a capability to create learnpress orders.

After adding edit post capability, I can a role with this able to get as far as as being able to create a new order (post).

But, to add an item (course), this fires off search course api, but this is restricted to admin.

I'd like to change this so that it can be available to anyone with this capability,

Also I have added the role to be able to list users.

But from learnpress order, again, on the order page.,the user list is restricted to administer role..

I can see a lot of code in the /admin folder relies on checking if the current user is ADMIN_ROLE anand "administrator".

I'd love to get help with how to change this check to check for a capability instead, eg "lp_manage_order"

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

No branches or pull requests

1 participant