I would like to allow Umbraco back office users can access a page.
The controller is intended for Umbraco back end users only.
I wanted to create a new Section in the Umbraco backoffice. The new "sample" section directs user to a MVC view.
The membership helper will check to see if members are logged into the front end of your website, not the umbraco back office. there are two 'membership' providers within an umbraco site, Members are for when you're site lets people login and Users are for your editors of the site (via the umbraco) url.
I am not sure but if you only want back office users to see the controller you may be able to add the UmbracoAuthorize attribute to the class
[Umbraco.Web.WebApi.UmbracoAuthorize]
public class controller ....
If the page is something just for your back office users, you might want consider making it a dashboard and adding to to the relevant section in the back office
Calling MembershipHelper in Controller
I tried using Umbraco MembershipHelper in a Controller that inherits from SurfaceController.
I would like to allow Umbraco back office users can access a page.
I noticed that MembershipHelper.IsLoggedIn() is always false even I have logged into Umbraco.
Why?
According to the documentation, we can use MembershipHelper on a View, Controller etc... https://our.umbraco.org/documentation/reference/querying/membershiphelper/
Hi Dominic,
Membership is a totally different thing to Umbraco Users. There are two different tabs in the back-end for configuration.
Users are for back-end access, for example to edit content, Members can be used for restricting front end (public) content.
For more information on membership click here
Regards,
Tim
The controller is intended for Umbraco back end users only. I wanted to create a new Section in the Umbraco backoffice. The new "sample" section directs user to a MVC view.
application.config
Dashboard.config
Hi,
The membership helper will check to see if members are logged into the front end of your website, not the umbraco back office. there are two 'membership' providers within an umbraco site, Members are for when you're site lets people login and Users are for your editors of the site (via the umbraco) url.
I am not sure but if you only want back office users to see the controller you may be able to add the UmbracoAuthorize attribute to the class
If the page is something just for your back office users, you might want consider making it a dashboard and adding to to the relevant section in the back office
Yes only wanted the back end office user to access the Controller. I created a new section on the dashboard.
is working on a reply...