hii i am trying a django using a frontend but my server is other lang. is possible my senario is i have created a roles like admin user journalist editor i am trying handle roles
supose i am login in and i receive data is
{
“user”: {
“id”: 2,
“email”: “prakashuniyal@gmail.com”,
“full_name”: “prakash singh”,
“role”: “journalist”,
“number”: “89790497734”
},
“refresh”: “I”,
“access”: “”
}
and is my role is suppose journalist then i am redirect journalist deshboard and other roles is as welss ass same or if other any access this my endpoint then all is resticted please give a solutiosn
Welcome @Prakashuniyal02 !
How well do you already know Django?
The details of how to use the Django permission system for restricting access to views is covered at Using the Django authentication system | Django documentation | Django. There is also a tutorial showing it being used at Django Tutorial Part 8: User authentication and permissions - Learn web development | MDN.
@KenWhitesell thanks for responding
i think you not understanding my problem i am saying that the issue my server are different lang and i am trying to creates dashboards according a role like if i am logging than receive me a data {
“user”: {
“id”: 2,
“email”: “prakashuniyal@gmail.com”,
“full_name”: “prakash singh”,
“role”: “journalist”,
“number”: “89790497734”
},
“refresh”: “I”,
“access”: “”
}
if my role are journalist y user y editor y admin what ever ? if my role is admin than redirect admin deshboard and if i my role is journalist than i redirect in journalist deshboaerd as well as other’s roles like role base access conrtoll system
I’m probably not. I’m not following what you’re trying to say here, and would need a more detailed and specific explanation of what the situation is and what the issue is that you are encountering.
Please be more specific and explain the situation with more details. Also please explain why this is a problem.
Please be more specific and explain the situation with more details. Also explain how this relates to the previous issue.
Also please explain why you think the Django permissions system isn’t the right answer to your issue. Include in your explanation what it is that you’re expecting Django to do for you here.
It would be most helpful if you included the technical details of the environment.
Finally, please avoid “buzzwords” like “dashboard” - we’re looking for technical details, so to be precise, make reference to things like views and urls, and if appropriate, processes and servers.