You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is possible to create custom user roles in Zabbix. Zabbix-CLI currently has a hard time utilizing these roles, because in commands where we expect a user role argument, we check for valid values using an enum (UserRole). It would be nice if we could keep the user, admin, superadmin, guest choices in the command help while still supporting custom roles.
One way to do this is to do away with the enum as the parameter type and instead make it a string parameter, and then inside the command pass it to some parsing function that tries to parse the value as a UserRole, and failing that, attempts to fetch the custom user role to see if it exists. This requires us to manually document the various predefined roles (user, admin, superadmin, guest) in the command docs, either in the main help text or via examples.
The text was updated successfully, but these errors were encountered:
It is possible to create custom user roles in Zabbix. Zabbix-CLI currently has a hard time utilizing these roles, because in commands where we expect a user role argument, we check for valid values using an enum (
UserRole
). It would be nice if we could keep theuser
,admin
,superadmin
,guest
choices in the command help while still supporting custom roles.One way to do this is to do away with the enum as the parameter type and instead make it a string parameter, and then inside the command pass it to some parsing function that tries to parse the value as a
UserRole
, and failing that, attempts to fetch the custom user role to see if it exists. This requires us to manually document the various predefined roles (user, admin, superadmin, guest) in the command docs, either in the main help text or via examples.The text was updated successfully, but these errors were encountered: