Git Product home page Git Product logo

Comments (5)

tablufc88 avatar tablufc88 commented on July 25, 2024 1

Found the issue. I had assigned another role to admin for debugging. When I removed it, intervention works as it should like you say.

My bad! I guess this wouldn't happen too often, so it's probably nothing to worry about.

from intervention.

darrenjacoby avatar darrenjacoby commented on July 25, 2024

Hi @tablufc88 ,

What plugin are you using (if any) to implement multiple user roles? I would like to re-create my side to test and see if I can find a viable solution.

from intervention.

tablufc88 avatar tablufc88 commented on July 25, 2024

Hey @darrenjacoby,

Not using a plugin, just using Stripe to assign roles based on subscription type with $user->add_role( $siteRole );$user->add_role( $planRole );

It seems that you can assign multiple roles using this plugin - https://en-au.wordpress.org/plugins/user-role-editor/

from intervention.

darrenjacoby avatar darrenjacoby commented on July 25, 2024

OK cool, will test with $user->add_role(), just wanted to make sure that was the route you were taking!

from intervention.

darrenjacoby avatar darrenjacoby commented on July 25, 2024

Hi @tablufc88 ,

Tested this with the plugin above, and it seems to work as should.

E.g. With the following, I can't see any updates when logged in as admin.

'wp-admin.all' => [ 'common.adminbar.wp' ], 'wp-admin.all-not-administrator' => [ 'common.updates' ]

This sounds correct though. Any user role with an administrator user role won't have common.updates removed, as it applies to all user roles excluding the administrator role.

Let me know if I'm understanding the above correctly.

from intervention.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.