In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
898 [In-Portal CMS] Admin Interfaces feature request always 2010-10-22 17:59 2012-07-25 05:33
Dmitry  
alex  
normal  
closed 5.1.1-B2  
fixed  
 
none 5.2.0-B1  
http://groups.google.com/group/in-portal-dev/browse_thread/thread/c80a6371a8192071/61d07b0c3707557c
Created Admin Interface for managing Types of Permissions
1
0000898: Admin Interface for managing "Permission Types"
Create a new section in Admin (under Configuration->Website) called "Permission Types" which will list and allow managing all permissions.

Use "PermissionsConfig" table, but there is a need for a new field in called "System" which will be SET to 1 for Permission records inserted during the installation so they can NOT be deleted.
Implementation plan:
1. add IsSystem column (0 by default) to PermissionConfig table
2. place ALTER, used to add new column into "Core" module install/upgrades.sql file
3. update PermissionConfig table CREATE TABLE statement in "Core" module install/install_schema.sql file
4. place UPDATE statement in install/upgrades.sql of "Core" module, that will set IsSystem = 1 for all table records
5. for every module (from in-portal.full profile), that inserts records into PermissionConfig table change INSERT statement to have "1" in that new IsSystem column
6. perform clean install and verify, that table structure & contents are the same as they were before clean install (after manual table changing)
7. perform upgrade from 5.1.3 version and verify, that table structure & contents matches the one from clean install at the previous step

8. create new unit and connect it with PermissionConfig table
9. field ModuleId should be dropdown with contents selected from Modules table + 2 options "Admin" and "Front" hardcoded in "options" field option
10. create list/edit templates
11. create section called "Permission Types" in unit config, that will be displayed after "Modules" grid in "Configuration -> Website" section
12. assign all permission to that section for "admin" user group
13. export permission records, that were created for "admin" group from Permissions table into install/install_data.sql file of "Core" module (at correct position, where all permission sqls are)
14. add sqls from above to install/upgrades.sql file of "Core" module too
15. add site config under "admin/system_presets/simple" folder, that will hide this new section when simple interface preset is used
16. translate all needed phrases and then export "Core" module language pack into a separate file (only Admin & Both phrases)
17. merge exported language pack (only your phrases) into install/english.lang of "Core" module
18. test install/upgrade and verify that all phrases are in place and new section is visible/hidden when applicable

----

hours:
1. new unit config + templates - 2 h
2. install/upgrade scripts/phrases - 1 h
3. testing - 0.5 h

---

3.5 h + 0.5 h (since mantis couldn't accept non-integer quote) total
related to 0000397closed  (5.2.0)alex Ability to work with main event from OnBefore/OnAfter type events called from kDBItem class 
patch permission_types_core_898.patch (38,588) 2011-10-06 07:18
http://tracker.in-portal.org/file_download.php?file_id=1221&type=bug
patch permission_types_modules_898.patch (14,574) 2011-10-06 07:19
http://tracker.in-portal.org/file_download.php?file_id=1222&type=bug
patch permission_types_core_898.2.patch (38,603) 2011-10-07 10:23
http://tracker.in-portal.org/file_download.php?file_id=1228&type=bug
patch permission_types_core_v3.patch (41,993) 2011-10-12 04:06
http://tracker.in-portal.org/file_download.php?file_id=1232&type=bug
Issue History
2012-07-25 05:33 alex Note Added: 0005112
2012-07-25 05:33 alex Status resolved => closed
2012-01-13 09:20 alex Changeset attached 5.2.x r15039
2011-10-22 05:27 alex Estimate Points => 1
2011-10-12 04:23 alex Fixed in Version => 5.2.0-B1
2011-10-12 04:23 alex Resolution open => fixed
2011-10-12 04:23 alex Assigned To !COMMUNITY => alex
2011-10-12 04:23 alex Changeset attached 5.2.x r14662
2011-10-12 04:23 alex Note Added: 0004044
2011-10-12 04:23 alex Status reviewed and tested => resolved
2011-10-12 04:09 alex Changeset attached 5.2.x r14661
2011-10-12 04:09 alex Changeset attached 5.2.x r14660
2011-10-12 04:09 alex Changeset attached 5.2.x r14659
2011-10-12 04:07 alex Changeset attached 5.2.x r14658
2011-10-12 04:06 alex Note Added: 0004043
2011-10-12 04:06 alex Assigned To alex => !COMMUNITY
2011-10-12 04:06 alex Status needs testing => reviewed and tested
2011-10-12 04:06 alex File Added: permission_types_core_v3.patch
2011-10-12 03:54 alex Relationship added related to 0000397
2011-10-07 10:25 erik Note Added: 0004038
2011-10-07 10:25 erik Assigned To erik => alex
2011-10-07 10:25 erik Status needs work => needs testing
2011-10-07 10:23 erik File Added: permission_types_core_898.2.patch
2011-10-06 14:21 Dmitry Note Edited: 0004036 bug_revision_view_page.php?bugnote_id=0004036#r870
2011-10-06 11:32 alex Note Added: 0004036
2011-10-06 11:32 alex Assigned To alex => erik
2011-10-06 11:32 alex Status needs testing => needs work
2011-10-06 07:19 erik Time Estimate Removed 4 =>
2011-10-06 07:19 erik Note Added: 0004031
2011-10-06 07:19 erik Assigned To erik => alex
2011-10-06 07:19 erik Developer => erik
2011-10-06 07:19 erik Status needs work => needs testing
2011-10-06 07:19 erik File Added: permission_types_modules_898.patch
2011-10-06 07:18 erik File Added: permission_types_core_898.patch
2011-10-04 21:04 Dmitry Note Added: 0004010
2011-09-26 03:32 alex Time Estimate Added 4
2011-09-26 03:32 alex Additional Information Updated bug_revision_view_page.php?rev_id=827#r827
2011-09-25 11:25 Dmitry Assigned To => erik
2011-09-25 11:25 Dmitry Status active => needs work
2011-09-25 11:25 Dmitry Target Version Icebox => 5.2.0
2010-10-22 17:59 Dmitry New Issue
2010-10-22 17:59 Dmitry Reference => http://groups.google.com/group/in-portal-dev/browse_thread/thread/c80a6371a8192071/61d07b0c3707557c
2010-10-22 17:59 Dmitry Change Log Message => Created Admin Interface for managing Types of Permissions

Notes
(0004010)
Dmitry   
2011-10-04 21:04   
Assigned to Erik
(0004031)
erik   
2011-10-06 07:19   
two patches attached - needs testing
(0004036)
alex   
2011-10-06 11:32   
(edited on: 2011-10-06 14:21)
1. please add column translation into related la_fld_ phrase (e.g. if la_fld_IsSystem phrase is found, then put your translation into that phrase column translation instead of creating la_col_IsSystem (see grid declarations in another unit configs).

2. Since 5.2.0 it's not recommended to create la_col_ phrases, but to create 1 phrases and put field & column translations into it.

3. Please always use $event->SetRedirectParam method to pass special parameter from event to template instead of putting variable into session. I've already reported this 1 time in another patch. In 5.2.0 version you can access main event (e.g. OnMassDelete) from current event (e.g. OnBeforeItemDelete) via $event->MasterEvent object.

4. Why there is "ORDER BY 1" added to options_sql in created unit config. I can't see how it will affect sorting. If it's for debugging, then it should be removed.

5. Please make section available in DBG mode when Simple Preset is loaded! Currently you have it hidden.

(0004038)
erik   
2011-10-07 10:25   
permission_types_core_898.2.patch attached - needs testing

3. can't use $event->SetRedirectParam in OnBeforeAfterDelete - MaterEvent property is not set in this case.
(0004043)
alex   
2011-10-12 04:06   
Ok, but some issues were fixed:
1. column widths set for all data to be visible at once
2. permission name made unique on adding/editing forms
3. phrase label validation added to permission description field
4. section can't be removed & in debug mode at the same time -> changed to "remove" in simple interface preset
(0004044)
alex   
2011-10-12 04:23   
Fix committed to 5.2.x branch. Commit Message:

Fixes 0000898: Admin Interface for managing "Permission Types"
Commit on behalf of Erik
(0005112)
alex   
2012-07-25 05:33   
Since 5.2.0 version was released.