Skip to main content
Topic: Error in the User roles permission 2.7.3 (Read 1590 times) previous topic - next topic

Error in the User roles permission 2.7.3

There is an error in the user rolse and permission in version 2.7.3
Application always try to change the fields in the table and makes it wrong.

First - why all the time try to change it??
I have Set up new table name for the Roles table, and Role Permitions as well new firld in the UserRole table - to let application generate it at all.
Each time I try click "Okey" button on the form " Manage User Roles Permition Tables" application try run SQL:
ALTER TABLE "sys_roles" MODIFY COLUMN 'ID' varchar(255) auto_increament;
ALTER TABLE "sys_roles" MODIFY COLUMN 'ID' Integer(11);

the other bug is that when I specify existing tables for the Roles and existing table for the Permissions then aplication try to change my RoldId field:
ALTER TABLE "sys_users" MODIFY COLUMN 'RoleId' Integer(11) default '';
of course default cannot be empty string for the Integer field

Please fix that asap as its impossible to use that.



Re: Error in the User roles permission 2.7.3

Reply #1
@TomRutko‍ this is not a bug. This is done every time you configure roles and permission to update the database with the new roles and permissions.
NOTE: This is normal functioning when using a dynamic role. The way Static Role function is different from the Dynamic Role functions.

Re: Error in the User roles permission 2.7.3

Reply #2
Understand but this SQL will Never never works in MySQL:
Cannot set auto_increament for varchar column:
ALTER TABLE "sys_roles" MODIFY COLUMN 'ID' varchar(255) auto_increament;

as well
default for Integer column in MySQL cannot be empty string:
ALTER TABLE "sys_users" MODIFY COLUMN 'RoleId' Integer(11) default '';

and those are the bug.