Anonymous | Login | Signup for a new account | 2024-04-20 04:11 CDT |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
View Revisions: Issue #14 | [ All Revisions ] [ Back to Issue ] | ||
Summary | 0000014: Check ADD/EDIT Permissions in Section drop-down | ||
Revision | 2009-05-18 14:06:49 by alex | ||
Additional Information | Implementation Steps: 1. Create NEW tag to glue (using "-") together all values from following SQL: SELECT * FROM Permissions WHERE (Type = 0) AND (Permission LIKE '%.VIEW' OR Permission LIKE '%.ADD' OR Permission LIKE '%.DELETE' OR Permission LIKE '%.MODIFY') 2. Get Groups of current User. 3. Create array keys for (for each group) which will be checked in generated above array. 4. Check ADD permissions to Add a new item, Check MODIFY permission to Edit an item. First part of permissions (LINK, NEWS, и etc) get by Prefix from unit config: ItemPermPrefix option. 5. After all checked we know list of Sections where User can Add/Edit items. 6. Using JSONHelper output that Array as a Tag result. 7. At the bottom of template using JQuery go through all <SELECT> Options of ParentId/CategoryId field and DISABLE the ones that do NOT have permissions from the above Array. |
||
Revision | 2009-05-18 10:55:32 by alex | ||
Additional Information | Implementation Steps: 1. Create NEW tag to glue (using "-") together all values from following SQL: SELECT * FROM Permissions WHERE ( Type = 0 ) AND ( Permission LIKE '%.VIEW' OR Permission LIKE '%.ADD' OR Permission LIKE '%.DELETE' OR Permission LIKE '%.MODIFY' ) 2. Get Groups of current User. 3. Create array keys for (for each group) which will be checked in generated above array. 4. Check ADD permissions to Add a new item, Check MODIFY permission to Edit an item. First part of permissions (LINK, NEWS, и etc) get by Prefix from unit config: ItemPermPrefix option. 5. After all checked we know list of Sections where User can Add/Edit items. 6. Using JSONHelper output that Array as a Tag result. 7. At the bottom of template using JQuery go through all <SELECT> Options of ParentId/CategoryId field and DISABLE the ones that do NOT have permissions from the above Array. |
Main | My View | View Issues | Change Log | Roadmap | Docs | Wiki | Repositories |
Web Development by Intechnic In-Portal Open Source CMS |