UsersController.php
function beforeFilter() {
parent::beforeFilter();
$this->Auth->allow('view', 'add', 'edit');
}
On 17 February 2014 12:38, Leandro Machado Pereira wrote:
> So Try,
>
> $this->Auth->allow(array('controller' =
So Try,
$this->Auth->allow(array('controller' => 'users' , 'action' => 'view'));
$this->Auth->allow(array('controller' => 'users' , 'action' => 'add'));
$this->Auth->allow(array('c
* method in
> *appController.php*.
> I am using cakePhp 2.4
>
>
> ---
>
> *public function beforeFilter() {
>
> $this->Auth->allow(
> array(
>
I have admin authentication with the following *beforeFilter()* method in
*appController.php*.
I am using cakePhp 2.4
---
*public function beforeFilter() {
$this->Auth->allow(
'logoutRedirect' => array('controller' => 'pages', 'action' =>
> 'home')
> )
> );
>
> public function beforeFilter() {
> if (isset($this->params['prefix'
>
'index'),
'logoutRedirect' => array('controller' => 'pages', 'action' =>
'home')
)
);
public function beforeFilter() {
if (isset($this->params['prefix']) && $this->params['prefix
('admin'=>false,'controller'=>'pages','action'=>'home'),
'autoRedirect' => false,
'authorize' => array(
'Actions' => array(
'actionPath' => 'controllers'
)
On Fri, Nov 23, 2012 at 5:37 AM, MetZ wrote:
>
> So, what to put where?
>
> eg: PageController
> $this->allowedActions = array_merge($this->allowedActions, $args);
No, no. This line is from AuthComponent. I just mentioned it to point
out that calling allow() in AppController *and* your regular
co
e($this->allowedActions, $args);
>
> AppController
> ???
>
> not 100% sure how you are doing it.. :)
>
> Thanks for your time!!!
>
> --Tom
>
> kl. 00:04:49 UTC+1 fredag 23. november 2012 skrev cricket følgende:
>>
>> Ignore what I said. I just thought
UTC+1 fredag 23. november 2012 skrev cricket følgende:
>
> Ignore what I said. I just thought about it for a minute and that's
> incorrect. Auth::allow merges the actions:
>
> $this->allowedActions = array_merge($this->allowedActions, $args);
>
> So when it runs i
Ignore what I said. I just thought about it for a minute and that's
incorrect. Auth::allow merges the actions:
$this->allowedActions = array_merge($this->allowedActions, $args);
So when it runs in a given Controller the other actions are merged
with whatever you allow in AppControl
in my AppController = TellaFriend
>
> That allows a visitor to email his friend about a spesific page on the
> website, eg: shared by all controllers
>
> Now, if I need to have the function available to my views using
> PostsController, I need to put in Auth allow TellaFriend in P
Hi.
I have a function in my AppController = TellaFriend
That allows a visitor to email his friend about a spesific page on the
website, eg: shared by all controllers
Now, if I need to have the function available to my views using
PostsController, I need to put in Auth allow TellaFriend in
He means that he wants his AppController actions Auth::allow()ed globally.
I've never run into this personally; don't know if it's a bug. Are
these *actions* or just global functions that your controllers call
internally? The latter I've done many times. There's no need
I hope I haven't misunderstood what you are trying to do... If they are shared
functions just put and allow them in app controller and call them from any
other controller like so: $this->myFunctionName().
On 22 Nov 2012, at 16:04, MetZ wrote:
> Hi.
>
> Anyone know how I can
Hi.
Anyone know how I can auth allow shared functions in appcontroller?
Appcontroller:
public function beforeFilter() {
$this->Auth->allow('SharedFunction');
OtherController.php
public function beforeFilter() {
parent::beforeFilter();
$this->Auth->allow('
Thank you very much. I will try it out.
On Wednesday, November 7, 2012 4:24:17 PM UTC+8, Andras Kende wrote:
>
>
> Try: $this->Auth->allow(); its changed in cake 2.2 ...
>
> Andras Kende
> http://www.kende.com
>
> On Nov 7, 2012, at 12:10 AM, Sam > wrote:
>
Try: $this->Auth->allow(); its changed in cake 2.2 ...
Andras Kende
http://www.kende.com
On Nov 7, 2012, at 12:10 AM, Sam wrote:
> Sorry for missing out the version number. I am using CakePHP ver2.2.1
>
> On Sunday, November 4, 2012 9:30:17 PM UTC+8, euromark wrote:
> y
denying only a few. I have this below in AppController class;
>>
>> public function beforeFilter()
>> {
>> $this->Auth->allow('*');
>> $this->Auth->deny('delete', 'edit','add');
>> }
>>
>> For some re
xperts,
>
> I want to have lenient authorization for my CakePHP app allowing most
> actions and denying only a few. I have this below in AppController class;
>
> public function beforeFilter()
> {
> $this->Auth->allow('*');
> $this->Auth->den
Dear CakePHP experts,
I want to have lenient authorization for my CakePHP app allowing most
actions and denying only a few. I have this below in AppController class;
public function beforeFilter()
{
$this->Auth->allow('*');
$this->Auth->deny('delete',
Thanks. looks like 2.1 has a new way to do this...
$this->Auth->allow();
finds every public method and adds this to the allow array.
Thanks, I read that page several times, but missed that subtle
difference.
On 5/6/2012 11:10 AM, stor
Sounds like unfinished upgrade from 2.0 to 2.1
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#making-actions-public
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org a
In my AppController beforeFilter() - I have an
$this->Auth->allow('display');
Then in another controller I do
class AddressesController extends AppController {
public function beforeFilter() {
parent::beforeFilter();
$this->Auth->allow('*'
k you are allowed to see
> that?',
>'authenticate' => array('Form'),
> ), 'Session');
>
> function beforeFilter(){
>$this->Auth->allow('*');
>
;Auth' => array(
'authError' => 'Did you really think
you are allowed to see
that?',
'authenticate' => array('Form'),
), &
Thanks. It is good
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscr...@goog
$this->Auth->deny('*');
$this->Auth->allow('edit');
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 24 Jun 2011, at 06:49, Prabha Vathi wrote:
> Yes, I am using that. The list is going bigger ;) I just don't allow them
> only in one page.
Yes, I am using that. The list is going bigger ;) I just don't allow them
only in one page.
Thanks for the advice.
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their Ca
Hi. in your controller u can user like this:
function beforeFilter(){
parent::beforeFilter();
$this->Auth->allow('action names');
}
it will work
On Fri, Jun 24, 2011 at 10:55 AM, Prabha Vathi wrote:
> Hi,
>
> In my website, users are not jus
Hi,
In my website, users are not just allowed in profile edit page.
Should i include all the controller actions except edit in Auth allow? Or is
there any other method?
Thanks
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP
On 6 Mag, 08:19, Ryan Schmidt wrote:
> On May 5, 2011, at 15:16, Mariano C. wrote:
>
> > function beforeFilter()
> > {
> > parent::beforeFilter();
> > $this->Auth->allow(array('showTables'));
> > }
>
> > When i callhttp:/
On May 5, 2011, at 15:16, Mariano C. wrote:
> function beforeFilter()
> {
>parent::beforeFilter();
> $this->Auth->allow(array('showTables'));
> }
>
>
>
> When i call http://./showTables/season_id:1 for the first time I
> will b
$this->cakeError('defaultSesonNotFound',
array('seasons' => $seasons));
}
}
}
}
It works correctly. Now if inside a controller there's an action and i
want to make it public i override beforeFilter method:
function beforeFilter
Hi
See it -> http://book.cakephp.org/view/1255/AuthComponent-Methods
function beforeFilter() {
...
$this->Auth->allow('*');
}
Regadrs,
Daniel
On 20 oct, 12:06, Toby G wrote:
> More details...
>
> It looks like it's use of any Auth method in
Hi,
In teh cookBook ->
http://book.cakephp.org/complete/1250/Authentication#allow-1257
function beforeFilter() {
...
$this->Auth->allow('*');
}
Regards,
Daniel
On 20 oct, 11:47, Toby G wrote:
> Hi all,
> I've just added the line..
More details...
It looks like it's use of any Auth method in the AppController
beforeFilter method.
Toby
On 20 Oct, 10:47, Toby G wrote:
> Hi all,
> I've just added the line...
>
> $this->Auth->allow(array('*'));
>
> ... to my beforeFilter method in
Hi all,
I've just added the line...
$this->Auth->allow(array('*'));
... to my beforeFilter method in my AppController, but am now getting
this error when attempting to view my home page (/views/pages/
home.ctp)...
Fatal error: Call to undefined method Debugger::checksessi
Thank you :)
On 24 Set, 23:54, nurvzy wrote:
> Indeed, Miles J is correct.
>
> On Sep 24, 1:21 pm, Miles J wrote:
>
> > I'm not sure thats how Auth works, it only accepts actions:
>
> > // In books controller
> > $this->Auth->allow('index'
Indeed, Miles J is correct.
On Sep 24, 1:21 pm, Miles J wrote:
> I'm not sure thats how Auth works, it only accepts actions:
>
> // In books controller
> $this->Auth->allow('index');
>
> // In users controller
> $this->Auth->allow('collecti
I'm not sure thats how Auth works, it only accepts actions:
// In books controller
$this->Auth->allow('index');
// In users controller
$this->Auth->allow('collection', 'register');
On Sep 24, 11:32 am, "Mariano C." wrote:
> H
Hi, this is my app_controller
class AppController extends Controller
{
var $components = array('DebugKit.Toolbar', 'Auth', 'Session',
'Facebook.Connect');
var $helpers = array('Facebook.Facebook');
function beforeFilter()
Seems like a story of "CRUD" with Acl, if your user as an ARO whose
parent it's the department, and all user of this department have same
ARO parent, any ACO (your model / record) can be checked on
ACL using the crud
On Sep 9, 10:45 pm, cricket wrote:
> On Thu, Sep 9, 2010 at 4:29 PM, calzone
On Thu, Sep 9, 2010 at 4:29 PM, calzone wrote:
> Thanks.
>
> I am using ACL, but not terribly comfortable with it. I'm still
> trying to figure out how to make it grant "ownership" of content that
> is created by one user so only he can see it, or for other content,
> that is created by a user be
Thanks.
I am using ACL, but not terribly comfortable with it. I'm still
trying to figure out how to make it grant "ownership" of content that
is created by one user so only he can see it, or for other content,
that is created by a user belonging one department so that other
departments can't see
On Thu, Sep 9, 2010 at 3:10 PM, calzone wrote:
> I've been searching the web for an hour now trying to find out how to
> do this and no one seems to be talking about it.
>
> Namely, the problem is that when I set $this->Auth->allow('display')
> (or allowed
On Thu, Sep 9, 2010 at 3:35 PM, cricket wrote:
> Auth restricts based on actions, while what you're looking for is
> restriction based on request parameters. Fortunately, in your specific
> case, there's a simple solution:
>
> public function beforeFilter()
> {
> $this->Auth->deny('*');
>
>
I've been searching the web for an hour now trying to find out how to
do this and no one seems to be talking about it.
Namely, the problem is that when I set $this->Auth->allow('display')
(or allowedActions or other flavors of the same thing) I get a
situation where all
(Just like viewing the
index of a certain model is using the index *action* of that
controller.
On May 3, 1:19 pm, AGD wrote:
> I'm using
>
> $this->Auth->allow('index');
>
> in my controllers wildly, but cannot figure out how to allow one
> specific page (lik
and redirect if needed.
On Sun, May 3, 2009 at 1:19 PM, AGD wrote:
>
> I'm using
>
> $this->Auth->allow('index');
>
> in my controllers wildly, but cannot figure out how to allow one
> specific page (like the home).
I'm using
$this->Auth->allow('index');
in my controllers wildly, but cannot figure out how to allow one
specific page (like the home). Has anyone experienced this, and how
did you solved it?
--~--~-~--~~~---~--~~
You received this me
Try adding an isAuthorized method to your AppController:
/**
* Function to return whether you are authorized or not.
*
* @return
*/
function isAuthorized() {
return true;
}
On Jan 9, 7:31 am, volka wrote:
> Hi there,
> i have
> $this->Auth-
r!
>
> S.
>
> On Jan 10, 9:26 pm, volka wrote:
>
> > I'm sure it has changed since Cake 1.2 final release.
> > But anyway, I tried $this->Auth->allow('display'); also, as stated
> > before..
>
> > Any other suggestions on this?
>
> >
Place that rule in beforeFilter of PagesController!
S.
On Jan 10, 9:26 pm, volka wrote:
> I'm sure it has changed since Cake 1.2 final release.
> But anyway, I tried $this->Auth->allow('display'); also, as stated
> before..
>
> Any other suggestions on
I'm sure it has changed since Cake 1.2 final release.
But anyway, I tried $this->Auth->allow('display'); also, as stated
before..
Any other suggestions on this?
On 9 Jan., 23:02, Miles J wrote:
> You dont use arrays as the arguments.
>
> $this->Auth->a
You dont use arrays as the arguments.
$this->Auth->allow('page1', 'page2', 'page3', 'etc');
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP&qu
Hi there,
i have
$this->Auth->allow(array('display'));
in my beforeFilter() - method of my AppController, but it doesn't show
the homepage, though.
I'm using the latest release of 1.2
( I tried $this->Auth->allow('display'); to ensure it's not a
Hi,
I've got, say, two actions, with exactly the same action name but
belong to different controllers.
posts/add,
comments/add.
I want to set:
$this->Auth->allow('comments/add');
(while blocking users not logged in from access posts/add)
But this syntax does not seem to
I am running the latest svn version as well. It broke for me.
//Does not redirect
$this->Auth->allow('register', 'login');
//Works fine
$this->Auth->allow('register');
On 19 mei, 18:41, francky06l <[EMAIL PROTECTED]> wrote:
> Actually a
you should be fine.
>
> /Martin
>
> On May 19, 10:50 am, Crazy <[EMAIL PROTECTED]> wrote:
>
> > I just started looking into the auth component, I don't need ACL's or
> > anything, all I need is simple authentication and a small form where
> > someo
just started looking into the auth component, I don't need ACL's or
> > anything, all I need is simple authentication and a small form where
> > someone can make an account.
>
> > Everything works fine, I can log in etc, that is untill I use the
> > "$this-
re
> someone can make an account.
>
> Everything works fine, I can log in etc, that is untill I use the
> "$this->Auth->allow('*');" or "$this->Auth->allow("login",
> "register");" to have access to "/users/register"
>
>
t; I just started looking into the auth component, I don't need ACL's or
> anything, all I need is simple authentication and a small form where
> someone can make an account.
>
> Everything works fine, I can log in etc, that is untill I use the
> "$this->Auth-&
to the auth component, I don't need ACL's or
> anything, all I need is simple authentication and a small form where
> someone can make an account.
>
> Everything works fine, I can log in etc, that is untill I use the
> "$this->Auth->allow('*');" or "$
I just started looking into the auth component, I don't need ACL's or
anything, all I need is simple authentication and a small form where
someone can make an account.
Everything works fine, I can log in etc, that is untill I use the
"$this->Auth->allow('*');
w non-authenticated access to actions through the use of
$this->Auth->allow(...).
Now, if you have certain methods that you want to be "admin only",
then that is where $this->Auth->deny(...) comes into play. Here is a
very simple example of denying users who are not admin
> }
>
> }
>
> what I ended up doing was just placing a beforefilter function on each
> controller and that seemed to work =)
>
> function beforeFilter(){
> $this->Auth->allow('index');
> }
>
> But thanks for all the help
&g
oreFilter(){
$this->Auth->allow('index');
}
But thanks for all the help
On May 9, 5:44 pm, Fabian <[EMAIL PROTECTED]> wrote:
> ok I think I found out what the problem was. I was calling a component
> on the controller I was testing so it was
lified this to :
>
> function beforeFilter(){
>
> $this->Auth->allow('*');
> $this->Auth->deny('delete','add','edit');
> }
>
> and the urls with controller/delete , controller/add, , controller/
>
dex');
$this->Auth->loginError = 'Invalid e-mail / password
combination. Please try again';
$this->Auth->authError = 'You have logged out please log back in
so we know who you are';
$this->Auth->autoRedirect = false;
Ok i've simplified this to :
function beforeFilter(){
$this->Auth->allow('*');
$this->Auth->deny('delete','add','edit');
}
and the urls with controller/delete , controller/add, , controller/
edit
class AppController extends Controller {
var $components = array('Auth');
function beforeFilter()
{
$this->Auth->allow('*');
$this->Auth->deny('delete','add','edit');
/
<[EMAIL PROTECTED]>:
>
> yes I've read it and thx for the if statement error but still the
> index page is shown.
>
> I've even tried doing it without the if statement
>
> function beforeFilter()
> {
>
> $this->Auth->allow('*
yes I've read it and thx for the if statement error but still the
index page is shown.
I've even tried doing it without the if statement
function beforeFilter()
{
$this->Auth->allow('*');
$this->Auth->deny('delete','add'
low methods for the index
> function.
>
> In my app controller I have
>
> function beforeFilter()
> {
>
> $this->Auth->allow('*');
> $this->Auth->deny('delete','add','edit');
>
> if ($this->name =
Hi all.
I'm having problem using the deny and allow methods for the index
function.
In my app controller I have
function beforeFilter()
{
$this->Auth->allow('*');
$this->Auth->deny('delete','add','edit');
if ($t
On Thu, Apr 3, 2008 at 12:53 PM, Mech7 <[EMAIL PROTECTED]> wrote:
>
> Hmmm well it is a password field... also it is the same code as i just
> get it from my svn repository.. and the cakephp i also get the latest
> from svn.. :(
Again, I reiterate that the only way a password field would displ
Hmmm well it is a password field... also it is the same code as i just
get it from my svn repository.. and the cakephp i also get the latest
from svn.. :(
On Apr 1, 4:25 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote:
> On Tue, Apr 1, 2008 at 10:14 AM, Mech7 <[EMAIL PROTECTED]> wrote:
>
> > I am
On Tue, Apr 1, 2008 at 10:14 AM, Mech7 <[EMAIL PROTECTED]> wrote:
>
> I am trying to allow access to some controllers.. but it seems it does
> not work at all?
> I am using latest version from SVN.. Also what is strange in windows
> it works normal.. but in Ubuntu the login page sends the pass
);
$this->Auth->loginRedirect = array('controller' => 'pages',
'display' => 'home');
$this->Auth->logoutRedirect = '/';
$this->Auth->allow("*");
--~--~-~--~--
Arne,
Good to see you got the other stuff going, I just replied so I guess
you can ignore that :)
Use $this->Auth->allow("*") to allow access to all actions, or $this-
>Auth->allow("foo", "bar") to allow access to the foo and bar actions
of the current
Hi,
regarding to my auth problem again (got it working now) just a quick
question: Is the allow() method not working at all or do i
misunderstand something? When using $this->Auth->allow() it seems to
disallow something within my login handler even when allowing login,
logout an
82 matches
Mail list logo