Jump to:

23368 Posts in 18143 Topics by 2863 members

General Questions

SilverStripe Forums » General Questions » Removing admin panel?

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

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

Page: 1
Go to End
Author Topic: 1259 Views
  • 404 Productions
    Avatar
    Community Member
    2 Posts

    Removing admin panel? Link to this post

    Hi all.
    After using SS for my private projects since almost a year, I just started migrating some of clients' services to SS.
    I've just encountered a problem with setting up the following environment.

    I'm thinking of keeping the main instance of the project on my own secured server and creating a copy at client's hosting server, both sharing the same DB. However, I want to mantain the site on my own server, so I'd like to completely disable the CMS functionalities in the second, copied instance for security reasons (in case client's security level is unreliable).

    My first thought was to use two different DB logins, one of them only with SELECT privileges, but this way I would disable some functionalities that require writing in DB, for example the comments module.

    So my question is - how to disable the CMS functionality in one instance of SS? In most cases, I can just disable access to '/admin' folder in the server's config, but sometimes I am unable to edit it. Is there any way of disabling '/admin' access in SS or - the best choice - just physically removing '/admin' functionalities from the project?

    Thanks for advice.

  • baba-papa
    Avatar
    Community Member
    279 Posts

    Re: Removing admin panel? Link to this post

    I can´t understand your problem. Your solution sounds very complicated to me. Why dont you creat a usergroup without admin rights?

  • 404 Productions
    Avatar
    Community Member
    2 Posts

    Re: Removing admin panel? Link to this post

    OK, simplified - I have two copies of the same project in SS, one at my own server, and one at client's server, where I am unable to edit any configs except SilverStripe, both copies sharing the same database.

    I want my admin panel to be reachable only from specified hosts, this can be easily achieved by editing my webserver's config, but as both copies of SS share the same database, you can still login to CMS at client's server, using the same login and pass, without hosts validation. So I am trying to disable admin login at client's copy of SilverStripe, as the admin panel would still be available at my webserver, but ONLY if user host was previously added to its config.

    How can I remove CMS admin access at SilverStripe?

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Removing admin panel? Link to this post

    Could you add a RewriteRule / RewriteCond on the clients .htaccess file which redirected all admin/ requests to something like a 404 page rather then passing it through to main.php?

    Something like this would also work as it would bypass the main.php functionality rendering all /admin/ links useless

    // in your .htaccess above the RewriteRule
    RewriteCond %{REQUEST_URI} !^/admin/.*

    Its like disabling the CMS with a sledgehammer, messy but functional.

    1259 Views
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.