Jump to:

5554 Posts in 1742 Topics by 1227 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Access in actions

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 274 Views
  • cachobong
    Community Member
    9 Posts

    Access in actions Link to this post

    Is there any way that i can check which action was accessed? for example for Register action on a Sign Up Page, i can access this without having to login then if i just access the page without any action i am required to login.

    mysite.com/upgrade-me <-- has to be logged in
    mysite.com/upgrade-me/Register <-- no need to be logged in.

  • Willr
    Forum Moderator
    5511 Posts

    Re: Access in actions Link to this post

    You can require permissions in the $url_handlers helper or in your actions method.

    function youraction() {
    if (!Member::currentUser()) {
    return Security::permissionFailure();

    // rest of youraction ..


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.