[wp-hackers] Error: Are you sureyou want to do this?

William P. Davis will.davis at gmail.com
Thu Apr 28 21:00:42 UTC 2011


In the meta box save and the inner meta box, if !current_user_can() : return false
Sent from my BlackBerry® wireless device

-----Original Message-----
From: Leo Baiano <ljunior2005 at gmail.com>
Sender: wp-hackers-bounces at lists.automattic.com
Date: Thu, 28 Apr 2011 17:57:39 
To: <wp-hackers at lists.automattic.com>
Reply-To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Error: Are you sureyou want to do this?

How do I register for a just Metabox certain level of user? I'm using a
custom class to generate the goal box Metabox and do not know which
parameter set the user levelwould have access to this box.

2011/4/28 Jeremy Clarke <jer at simianuprising.com>

> It sounds like you have a check against current_user_can() in the code that
> uses the input from your metabox as well as in the metabox itself. Did you
> check that part as well?
>
> You may also want to try logging in with a different browser, it might be a
> bug with the cookies or something.
>
> As to your general situation, you should try to only register the metabox
> when the user deserves to see it, rather than registering it for all then
> unregistering for certain people. Ideally both sides of the management
> (frontend metabox and backend handler) should be set to run only when the
> user has the right capabilities, since otherwise unprivileged users could
> accidentally delete information when your form handler recieves none of the
> fields it expected from the metabox.
>
>
> --
> Jeremy Clarke • jeremyclarke.org
> Code and Design • globalvoicesonline.org
>_______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
Amplexos,

Leo Baiano
http://www.leobaiano.com
http://www.blog.ljunior.com
http://www.mcelebridades.com
http://www.twitter.com/leobaiano
_______________________________________________
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