Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Need a ADMIN-only access page


Go to End


5 Posts   1295 Views

Avatar
AD5XJ

Community Member, 35 Posts

19 August 2014 at 3:20am

I am new to SilverStripe and enjoy it very much. I am learning a lot from the docs and tutorials.

However, the simple theme used in all the docs and tutorials has the CMS access link on the home page for all viewers. Such access is not the desirable situation for a live site for me.

I would like to create a separate (and not so obvious) login page displaying the normal /Security/Login page -- something like /user/login without a link on the home page. The annonymous user would, by definition, NOT know of the /user/login URL path.

Creating a home page for anonymous users is not a difficult task. I need only remove the links for CMS login and documentation from the HomePage. Creating the unique /user/login login page referring to the normal CMS login is a more confusing issue for me.

1) is the URL /user/login just a matter of creating a folder on the site in /assets or is it a matter of adding something to the content from CMS? ? ?

2) currently only Admin users are defined. I think I know how to create other user groups (e.g. editors, admins, contributors, etc.), but administering users and groups (individual page / URL access rights, membership, etc.) is not so clear from the docs. Is that functionality that needs to be created or is it a part of the CMS functionality ?

Again I am a newbie and I apologize if some of this has been covered by the docs or tutorials. Your reply should assume I know nothing and be very specific to my lack of knowledge of SilverStripe and PHP.

- AD5XJ Ken

Avatar
AD5XJ

Community Member, 35 Posts

20 August 2014 at 4:34am

SOLVED!

Well it was simpler than I thought.

1) I created a new page and made it a top level redirector page pointing to the login (sshome/admin).
2) I edited the URL to have the desired /user-login destination.
3) I set the page settings to have only Admin view and edit rights.

Now I know where it is and I am the only one who can log in (and those who I grant access).

Now I must add captcha to make it spam-resistant.

Avatar
AD5XJ

Community Member, 35 Posts

22 August 2014 at 7:11am

Well this is a very interesting development.

The procedure shown above has worked for several day now. But suddenly this morning, no login will work (meaning any login returns to the login form and does not redirect to /admin/pages).

The only thing different is the addition of the HTML5 support module and it was working well after that.

The pages created so far display perfectly. Just no ability to log in as admin.

I have tried resetting the admin password and inserting the default login/password in _config.php but it does not change the result.

Any ideas what may have set this action to blocking the CMS from starting up?

Avatar
Kirk

Community Member, 67 Posts

22 August 2014 at 12:33pm

Edited: 22/08/2014 12:35pm

No real good ideas why this would be happening but maybe the page was being cached initially which is why it has just started happening.
Also the html5 module does parse the html and could potentially be returning invalid

https://github.com/silverstripe/silverstripe-html5/blob/master/code/HTML5Value.php

Avatar
AD5XJ

Community Member, 35 Posts

23 August 2014 at 2:38am

My Bad - I should have posted a solution earlier...but thank you for your reply.

In a desperation attempt, I deleted the _config and moved the original install files to the server. The re-install attempt did reset the admin login and I did get the previously created content back as well. All seems to be functioning properly now as I can now access the CMS.

Working on a Security Login that has a Captcha field for human validation - to keep out the bots, hackers and spammers.