Angular dataTypeResource getByName causes a 401 unathorized.
Hi Guys,
I have a field type in Umbraco Forms that calls for data type in order to get it's configuration, in this case, an RTE however unless the user has Developer section access the call causes a 401 Unauthorized.
I'm afraid you will have to look for an alternative to accomplish what you need. The data type API is not supposed to be used outside of the backoffice. From the Umbraco source:
The security for this controller is defined to allow full CRUD access
to data types if the user has access to either: Content Types, Member
Types or Media Types ... and of course to Data Types
Angular dataTypeResource getByName causes a 401 unathorized.
Hi Guys,
I have a field type in Umbraco Forms that calls for data type in order to get it's configuration, in this case, an RTE however unless the user has Developer section access the call causes a 401 Unauthorized.
https://our.umbraco.org/apidocs/ui/#/api/umbraco.resources.dataTypeResource
The call I make to get the data type:
Thanks
Matt
Hi Matthew,
I'm afraid you will have to look for an alternative to accomplish what you need. The data type API is not supposed to be used outside of the backoffice. From the Umbraco source:
You can check that at: https://github.com/umbraco/Umbraco-CMS/blob/e0025db56d52b770d2b3aedbd48a3b804fd15ef0/src/Umbraco.Web/Editors/DataTypeController.cs#L31
Cheers!
Hi Cristhian,
Thanks for the link, I ended up doing just that custom API controller,
and a copy paste of the action I needed :)
Matt
Hi Matthew,
Just realised I have the same problem as you:
https://our.umbraco.org/forum/extending-umbraco-and-using-the-api/90252-disabling-backoffice-section-disables-api-access-to-users#comment-285008
Looks like I'm going to have to just re-implement those calls into my own API controller like you.
is working on a reply...