The system is divided into primary accounts and subaccounts. The original requirement is that the primary account has all permissions, and the subaccount has permissions in groups. Now, the requirement is improved. You must add permissions to the primary account to manage some permissions of the primary account. The subaccount can only manage the permissions of the primary account. I...
The system is divided into primary accounts and subaccounts. The original requirement is that the primary account has all permissions, and the subaccount has permissions in groups.
Now the requirement has been improved, requiring you to add permission management for the primary account
We have the user_info table and the authorize table.
The user_info table contains all information about the account, including the primary account (identified by the owner_uid and id ).
All permission information is stored in the authrize table.
The sub-account obtains permissions through the group in which the sub-account belongs. The sub-account is identified in another group.
The primary account does not exist in any group. It only logically belongs to the super Administrator group, that is, it is controlled on the program.
The question now is how to control the permissions of the primary account?
The group leader gave a solution by adding two fields in the permission list, is_only/is_deny.
If the is_only field contains the primary account id data, it means that other primary accounts have no permissions.
If the is_deny field contains the primary account id data, other primary accounts have permissions.
Reply content:
The system is divided into primary accounts and subaccounts. The original requirement is that the primary account has all permissions, and the subaccount has permissions in groups.
Now the requirement has been improved, requiring you to add permission management for the primary account
We have the user_info table and the authorize table.
The user_info table contains all information about the account, including the primary account (identified by the owner_uid and id ).
All permission information is stored in the authrize table.
The sub-account obtains permissions through the group in which the sub-account belongs. The sub-account is identified in another group.
The primary account does not exist in any group. It only logically belongs to the super Administrator group, that is, it is controlled on the program.
The question now is how to control the permissions of the primary account?
The group leader gave a solution by adding two fields in the permission list, is_only/is_deny.
If the is_only field contains the primary account id data, it means that other primary accounts have no permissions.
If the is_deny field contains the primary account id data, other primary accounts have permissions.
Can I add the group concept to the primary account?
Then, the sub-account group can only have permissions within the Group permission range of the primary account.