Jump to content

Front end editing without backend access?


JayGee
 Share

Recommended Posts

As per the title really, is it possible to set up front end editing permission on a template without granting a user access to the back end dashboard?

I know I can allow editing with the API but seems to be reinventing the wheel somewhat!

Link to comment
Share on other sites

1 minute ago, bernhard said:

I think it should be enough to put this in your /site/templates/admin.php


if(!$user->isSuperuser()) $session->redirect('/');

 

A beautifully simple approach thank you! ?

Link to comment
Share on other sites

1 minute ago, bernhard said:

Actually this would also prevent you from opening the login-screen. But you get the idea and can modify it to your needs (like checking for a user role or a page template or id etc.).

Yes sure I can make something work here thanks. Love these kind of simple approaches - I was way overthinking it!

  • Like 1
Link to comment
Share on other sites

9 hours ago, Ivan Gretsky said:

Wouldn't it also break complex fields frontend editing, which happens in popup iframes with admin pages loaded?

I think so, yes. But it should be quite easy to whitelist some pages/templates/roles and only redirect all other requests ? 

Link to comment
Share on other sites

11 hours ago, Ivan Gretsky said:

Wouldn't it also break complex fields frontend editing, which happens in popup iframes with admin pages loaded?

Interesting I hadn't considered that.

I was wondering - could I just change the admin template permissions in the access tab to exclude the roles I don't want to give backend access to? Any unforeseen consequences here? ?

 

Link to comment
Share on other sites

39 minutes ago, Guy Incognito said:

I was wondering - could I just change the admin template permissions in the access tab to exclude the roles I don't want to give backend access to? Any unforeseen consequences here? ?

I think that would have the same effect of breaking frontend editing modals. But you can easily allow modals via checking if $input->get->modal == true (note double == not triple, because modal can be 1 or panel or modal)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...