09-26-2016, 02:41 PM
Hey Userspice developers,
I just released my project to test and I'm really happy with all the help from userspice. For future versions of userspice, I would like to point out a potential feature that I noticed when I implemented userspice to my project.
Right now userspice controls user's access to the page level, meaning that based on the user's permission level, he/she can either enter a page or not, and there is no third option. But sometimes it would be cool to allow a certain group of user to access the page, and not granting them the permission to do any editing. On the admin's side, when the admin assigns a page to a user group, the admin would be able to do a "edit/read_only" selection for that group.
To generalize this idea, the selection under each page does not necessarily need to be limited to "edit/read_only". Maybe it would be possible to list the features on each page as a multiple-selection dropdown box, so that the admin can specify the user's permission to function level.
One way that I can think of to do this would be to create a separate table in the database called "page_function_matches" for the developers to fill out the functions they have on each of their pages, and then in userspice, the admission_permission.php page reads through the table to list all functions under each page, so that the admin user can choose functions they want to be available for each user group. In the developer's pages side, the developers would add a user group info detection logic at the beginning of their page.php file. If the usergroup info comes with the desired function id, then the page would enable that particular function.
That's just one way to do it that I'm currently using for my project. I'm not a computer science person so I don't know if this is a good method or not. I'm sure you guys would have a much better idea to do this. Please let me know of any questions.
Thanks
Angel
I just released my project to test and I'm really happy with all the help from userspice. For future versions of userspice, I would like to point out a potential feature that I noticed when I implemented userspice to my project.
Right now userspice controls user's access to the page level, meaning that based on the user's permission level, he/she can either enter a page or not, and there is no third option. But sometimes it would be cool to allow a certain group of user to access the page, and not granting them the permission to do any editing. On the admin's side, when the admin assigns a page to a user group, the admin would be able to do a "edit/read_only" selection for that group.
To generalize this idea, the selection under each page does not necessarily need to be limited to "edit/read_only". Maybe it would be possible to list the features on each page as a multiple-selection dropdown box, so that the admin can specify the user's permission to function level.
One way that I can think of to do this would be to create a separate table in the database called "page_function_matches" for the developers to fill out the functions they have on each of their pages, and then in userspice, the admission_permission.php page reads through the table to list all functions under each page, so that the admin user can choose functions they want to be available for each user group. In the developer's pages side, the developers would add a user group info detection logic at the beginning of their page.php file. If the usergroup info comes with the desired function id, then the page would enable that particular function.
That's just one way to do it that I'm currently using for my project. I'm not a computer science person so I don't know if this is a good method or not. I'm sure you guys would have a much better idea to do this. Please let me know of any questions.
Thanks
Angel