flask login with custom tables
Budget: $10 – $30 USD
The goal is to use python flask login with already existing user and roles tables, mysql is the engine. To later be able to use @login_required and @roles_required in some route.
Roles must be able to define the requirement of one or more or any of several.
As login (route /login or similar) you will be asked to enter an account, username and password. Which correspond to the User table, fields: accountID, userID and password respectively.
The structure of the User table is attached, the fields by which it must be authenticated are accountID and userID (forming a compound key), and the password field. In addition, the isActive field must be 1.
The existing roles table is called UserAcl and its structure is attached.
To give a test example, for the route "/test1" it will be required that the user (accountID + userID) have the aclID (UserAcl table) acl.admin.cargas or acl.admin.alertpanel, these are the values that should be specified in @ roles_required from the test route.
And for the route "/test2" that the user (accountID + userID) has both: acl.admin.cargas and acl.admin.alertpanel.
Roles must be able to define the requirement of one or more or any of several.
As login (route /login or similar) you will be asked to enter an account, username and password. Which correspond to the User table, fields: accountID, userID and password respectively.
The structure of the User table is attached, the fields by which it must be authenticated are accountID and userID (forming a compound key), and the password field. In addition, the isActive field must be 1.
The existing roles table is called UserAcl and its structure is attached.
To give a test example, for the route "/test1" it will be required that the user (accountID + userID) have the aclID (UserAcl table) acl.admin.cargas or acl.admin.alertpanel, these are the values that should be specified in @ roles_required from the test route.
And for the route "/test2" that the user (accountID + userID) has both: acl.admin.cargas and acl.admin.alertpanel.