Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
743 views
in Q2A Core by
i saw `Permission level for different types of users:`

   define('QA_PERMIT_ALL', 150);

    define('QA_PERMIT_USERS', 120);

    define('QA_PERMIT_CONFIRMED', 110);

    define('QA_PERMIT_POINTS', 106);

    define('QA_PERMIT_POINTS_CONFIRMED', 104);

    define('QA_PERMIT_APPROVED', 103);

    define('QA_PERMIT_APPROVED_POINTS', 102);

    define('QA_PERMIT_EXPERTS', 100);

    define('QA_PERMIT_EDITORS', 70);

    define('QA_PERMIT_MODERATORS', 40);

    define('QA_PERMIT_ADMINS', 20);

    define('QA_PERMIT_SUPERS', 0);

when i do registration, it inserted `0` in `level` column in `users` table. which is conflicting the upper permission. which one is correct? or how i can manage permission for different types of users?

1 Answer

+1 vote
by
The user levels are defined with the QA_USER_LEVEL_* constants in qa-include/app/users.php

The ones you posted are for the permissions i.e. the actions themselves. For example the action of "editing any post" may have a permission level of 70 which means Editors or above can do it.

The permissions can be changed on the Admin > Permissions page. And if you're an admin you can edit users to give them higher levels like Moderator etc.
by
what's about 'qa-include/app/options.php'?
by
What about them? Those are the ones that shahadat posted which I explained above.
by
I think you don't notice that it's exactly opposite of `QA_USER_LEVEL_*`. how could i manage it for my plugin?
...