Home

This PHPMaker 2024 project will show you how to Copy Permissions that belongs to certain User Level to another User Level.

Imagine this condition. You have many Tables in your PHPMaker project that need Permissions for each User Level. Then, you have already defined Permissions for User Level Operator, such as List, Search, Add, Edit, Delete, and so forth for all those Tables from the generated web application. Now you want to create another new User Level named Manager, and you want to define the similar Permissions to Operator user level, for Manager user level, one by one again just like you did for Operator user level above. This is suck, huh? :-(

So, this project is the right solution for you. Now you may simply Copy Permissions from Operator user level to Manager user level. Only one single click, then all the Permissions will be copied from origin User Level to the current/target User Level. This will save tons of your time. Of course, later, you may simply change only a few Permissions afterwards. Sounds promising, right? This will save tons of your time!

To try the demo, make sure you have already logged in by using Administrator user level. Username: admin, Password: master. Then go to menu ADMIN -> User Levels. No worries, you will be redirected to that page after successfully logged in. Then, in that List Page, make sure you have already defined Level Origin for your desired User Level, by clicking on pencil icon, and save the changes. After that, click on Copy Permissions next to User icon.

By using this project, then you will learn how to write only a few lines of PHP code to handle Copy Permissions for all Tables in your PHPMaker project. There are several Server Events that we can use. They are: Page_Load, ListOptions_Load, ListOptions_Rendered, and Row_CustomAction. Only a few of lines code that you need to add!

You will also learn how to hide some functionalities for the Anonymous, Administrator, and Default user levels. As we have already known, those 3 User Levels should not be edited and deleted. That's why we need to handle it, also by using Server Events.