[wp-hackers] After adding custom role, admin panel becomes inaccessible

Jake Goldman wphackers at jakemgold.myfastmail.com
Tue Jun 29 02:01:28 UTC 2010


Your capabilities array is set up wrong.

add_role( 'treasurer', 'Treasurer', array('read' =>  true, 'manage_finances' =>  true) );



On 6/28/2010 9:03 PM, Alex Hempton-Smith wrote:
> So I have a set of pages in my plugin which require the capability
> 'manage_finances' to be able to view. This works fine, if I give that
> capability to the 'administrator' role I can see them fine.
>
> I then created a custom role, with that very capability, like so:
>
> add_role( 'treasurer', 'Treasurer', array('read', 'manage_finances') );
>
> But when I assign that role to a test user, none of the admin panel is
> accessible - not the dashboard, profile, let alone the page I specified. I
> get this error:
>
> You do not have sufficient permissions to access this page.
>
>
> What could I be doing wrong?!
>
> -- Alex  (Hempsworth)
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>    


More information about the wp-hackers mailing list