I added custom post type successfully and added {accessLevel: 20} in addPostType.
Then I signed up with new user. Verified its email.
Case 1
Result - I was not able to see my custom post type in dashboard. ( New user had accessLevel 20 and role creator)
Case 2
I changed the accessLevel of the user from MongoDB to 50, and logged out and again logged in
Result - I was not able to see my custom post type in dashboard
Case 3
I changed the accessLevel of this user from MongoDB to 100, and logged out and again logged in.
Result - I was able to see my custom post type in the dashboard along with several others.
What did I conclude?
accessLevel parameter is not getting used in the code to determine which post types are shown on the dashboard. Instead, it is hardcoded to 100.
Revision
@factor/dashboard/menu.ts Line 73
factor/@factor/dashboard/menu.ts
I added custom post type successfully and added {accessLevel: 20} in addPostType. Then I signed up with new user. Verified its email. Case 1 Result - I was not able to see my custom post type in dashboard. ( New user had accessLevel 20 and role creator)
Case 2 I changed the accessLevel of the user from MongoDB to 50, and logged out and again logged in Result - I was not able to see my custom post type in dashboard
Case 3 I changed the accessLevel of this user from MongoDB to 100, and logged out and again logged in. Result - I was able to see my custom post type in the dashboard along with several others.
What did I conclude? accessLevel parameter is not getting used in the code to determine which post types are shown on the dashboard. Instead, it is hardcoded to 100.
Revision @factor/dashboard/menu.ts Line 73 factor/@factor/dashboard/menu.ts
Line 73 in cc86667
if (userCan({ accessLevel: 100 })) {
Hardcoded accessLevel:100 for the dashboard menu.