Q
Q
Quber2014-10-14 02:47:00
JavaScript
Quber, 2014-10-14 02:47:00

Do I need to check user permissions to view templates in RESTful applications?

Actually, I'm making an admin panel in AngularJs.
Do I need to check the user's rights to view the template? Or is it enough to check his rights when issuing json with data?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Romanov, 2014-10-14
@Serhioromano

Since the data will be rendered in the template, if there is no data, there is no rendering.
Angular is designed for this kind of work. This is when you have logic, calculations of your application and rights are checked on the server in the API and the interface is already drawn on the client. If you are generating templates on the server, then you are using Angulat just to download and paste the templates. That's not what it's made for. You can just use jQuery for this. Load the template with Ajax and insert it into the element.
There is no point in Angular if you don't manage the data on the template.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question