0 Posts in 0 Topics by 0 members
Jump to:If this is your first visit, you will need to register before you can post. However, you can browse all messages below.
| Page: 1 | go to end | Reply | |
| Author | Topic: Authentication / User Management in Silverstripe | 1194 views |

5 March 2007 at 5:19pm
Hi guys,
Silverstripe has definitely come at the right time for my project -- very exciting how quick it is to develop stuff. The tutorials (1-4) have been of high quality and extremely useful to bootstrap quickly.
However I'm a bit lost when it comes to authentication. My site will require authenticated access and I'm not really sure where first base is on this -- does Silverstripe support authenticated access? I'm assuming so because of the security bits but over that... any clues? Pointers to source at this stage is fine. Things I'm wanting to do:
- add a 'sign up' button taking them to a registration form with email verification
- add a 'login' button which shows a form for a user to log in
- add that login page as an interstitial if someone tries to access premium content -- i.e. they can click on the link but are redirected temporarily to the login page, after successful sign in of which it sends them to the page they wanted to go to.
?
thanks!
Julian
Newly signed up Silverstripe advocate.

5 March 2007 at 6:26pm
There are tools to help with this, but not something that works out of the box.
I'll get the team to put together a mini-tutorial about this.

6 March 2007 at 12:39am
That would be great Sam!

12 July 2007 at 5:54pm
Hi all,
I stumbled upon SilverStripe today and I think its a great CMS system. However, I'm really hoping to be able to have the ability for User Management - such as described above.
Any progress/tutorials on how to set up SilverStripe to handle "premium" content that is only viewable to registered (and logged in) viewers? With that in mind, I noted something about $LoginForm to create a login form. I wasn't clear whether this leads to the CMS or simply to functions/content that registered users have permission to access.
Any direction would be appreciated! Thanks!

12 July 2007 at 9:12pm
Cheers, I hope you're having a good experience so far. You're fortunate that one of our Google Summer of Code projects is adding an intuitive user interface for this, requiring no PHP coding whatsoever, however while this code was recently (as in about two days ago) submitted to us, it won't be ready until the end of the Google Summer of Code project, which is a little over a month away.
One easy way to see you through for the moment would be;
1. create a new page type, such as SecuredPages, in which the init() contains your authentication, which only allows private access to all pages of this type
2. you then add pages on your site as "SecuredPages", and setup a group, and add members to it.
3. Have lots of fun and await the Google Summer of Code real thing :)
Psuedocode for /code/SecuredPages.php
static $allowed_children = array(
);
}
class SecuredPage_Controller extends Page_Controller {
function init() {
if (**loggedInWithTheGroup('intranetUsers')** == false) {
**Security:permissionfailure();**// look up actual function name
}
}
}
?>
The **** bits are not real, you need to code those :P The "if loggedInWithTheGroup" will actually probably be a few lines, let us know if you can't figure it ... you need to get current member, check isingroup, etc
Last edited: 13 July 2007 at 9:20am

13 July 2007 at 3:44am
Thanks, Sigurd! I'll give that a whirl and see what I come up with.
| 1194 views | |||
| go to top | Reply |