3
Views
1
Comments
i have two kind of users admin and normal user 
Question

i have two kind of users admin and normal user , The normal user can post a post to my website. How can I enforce the rule of not posting any post except with the approval of the admin?

mvp_badge
MVP
Rank: #67

Hello Rashed.

I understand two possible questions.

User can write post, but Post needs approval from admin to be visible: You can have a Status attribute on the post entity. It user is admin, Status=Pubish. If user is normal, Status=Pending. It is also possible to have a secondary entity for those "drafts" so the ids of approved posts are sequential.

User can't write until approved by Admin: you need to make a support entity to register requests from Normal users to publish. Admins go there and give access to the ones they seem fit.