function remove_cap($cap)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

function remove_cap($cap)

WPG2-2

As part of the next release of the WPG2 plugin I have switched the plugin over to the roles / caps from the old userlevels.

To handle some of the Gallery2 security aspects I have added two new caps however unless I am missing something here remove_cap($cap) just  unsets the cap it actually does not remove that cap from the role.

Am I overlooking something here or is it not possible to clean up any custom caps if the plugin has been deactivated?


-------------------- m2f --------------------

WPG2 Forums (http://wpg2.ozgreg.com/forums/)

-------------------- m2f --------------------




_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: function remove_cap($cap)

David House
On 02/03/06, ozgreg <[hidden email]> wrote:
> To handle some of the Gallery2 security aspects I have added two new caps however unless I am missing something here remove_cap($cap) just  unsets the cap it actually does not remove that cap from the role.

global $wp_roles;
$wp_roles->remove_cap('rolename', 'capname');

--
-David House, [hidden email], http://xmouse.ithium.net
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: function remove_cap($cap)

WPG2-2
In reply to this post by WPG2-2


dmhouse at gmail.com wrote:
> On 02/03/06, ozgreg <[hidden email]> wrote:
>
> >  To handle some of the Gallery2 security aspects I have added two new caps however unless I am missing something here remove_cap($cap) just  unsets the cap it actually does not remove that cap from the role.
> >
> >
>
> global $wp_roles;
> $wp_roles->remove_cap('rolename', 'capname');
>


which just unsets the cap it does not remove it from the role..


-------------------- m2f --------------------

WPG2 Forums (http://wpg2.ozgreg.com/forums/)

-------------------- m2f --------------------




_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers
Reply | Threaded
Open this post in threaded view
|

Re: Re: function remove_cap($cap)

David House
On 02/03/06, ozgreg <[hidden email]> wrote:
> which just unsets the cap it does not remove it from the role..

Unsets the cap from the role. Then the option will be saved to the
options DB so that this change persists into future requests.

--
-David House, [hidden email], http://xmouse.ithium.net
_______________________________________________
wp-hackers mailing list
[hidden email]
http://lists.automattic.com/mailman/listinfo/wp-hackers