System: Access: migrate Users and Groups to MVC/API (#8046)
* System: Access: Groups - in preperation for https://github.com/opnsense/core/issues/7904, add support for comma separated member lists.
If we convert groups to a model, we will switch the nested <member> tags into comma separated fields, e.g.
<member>1</member>
<member>12</member>
will convert to:
<member>1,12</member>
using this commit we support both for areas where these are being read.
* System: Access: Users - refactor to MVC (https://github.com/opnsense/core/issues/7904)
* add initial boilerplate
* unpack `<priv/>` field on first access
[65 lines not shown]
System: Access: migrate Users and Groups to MVC/API (https://github.com/opnsense/core/pull/8046)
o align "policy change for %s unlink group" with master (unlink when duplicates exists)
System: Access: Users - refactor to MVC (https://github.com/opnsense/core/issues/7904)
* add initial boilerplate
* unpack `<priv/>` field on first access
* unpack '<apikeys/>' field on first access and implement key actions into ApiKeyField
* add apikey grid in user management view
* change isset() to !empty() for users disabled flag in backend code
* move user atributes into dialog
* hook PrivField type to \OPNsense\Core\ACL()
* refactor Auth/API to use new User class
* otp seed logic with simple api call to generate new seeds and some JS glue for the frontend
* uid autonumber field
* language selector using get_locale_list() via configd (cached)
* add StoreB64Field field for authorizedkeys so we can keep the field contents backwards compatible.
* ExpiresField for custom date parsing, supporting previous input formats as well.
* group membership using a volatile custom field type, controller is responisble for persisting the configuration data to avoid entanglement between models
* add button which links to most likely user certs (based on commonname), to avoid all sorts of magic to reflect certs back into the usermanager.
* add getUserPrivs() to model so we can fetch a full list of privs for a user
* show user icons, long this might be less relevant
[10 lines not shown]
System: Access: Groups - in preperation for https://github.com/opnsense/core/issues/7904, add support for comma separated member lists.
If we convert groups to a model, we will switch the nested <member> tags into comma separated fields, e.g.
<member>1</member>
<member>12</member>
will convert to:
<member>1,12</member>
using this commit we support both for areas where these are being read.
System: Access: Users - refactor to MVC (https://github.com/opnsense/core/issues/7904)
review comments from @Monviech
* "Create and Download API Key for this user" refresh apikeys bootgrid
* "Users" bootgrid, add some columns
* rename "Username" to "Group Name" in group edit
* Disable sorting the bootgrid by "Users" and "Groups" as these are aggregated/formatted columns
System: Access: migrate Users and Groups to MVC/API (https://github.com/opnsense/core/pull/8046)
replace page-system-groupmanager-addprivs with page-system-usermanager-addprivs
System: Access: migrate Users and Groups to MVC/API (https://github.com/opnsense/core/pull/8046)
refactor add user event so it utilizes our new model instead of direct config access, while performing the operation, also make sure we lock/unlock the config.xml
firmware: use REQUEST to print a TLS/CRL usage hint
Also create output_text and output_cmd to allow for neater
firmware scripts with less duplication and use it in the
connectivity audit.
System: Access: migrate Users and Groups to MVC/API (https://github.com/opnsense/core/pull/8046)
replace page-system-groupmanager-addprivs with page-system-usermanager-addprivs
System: Access: migrate Users and Groups to MVC/API (https://github.com/opnsense/core/pull/8046)
refactor add user event so it utilizes our new model instead of direct config access, while performing the operation, also make sure we lock/unlock the config.xml
System: Access: migrate Users and Groups to MVC/API (https://github.com/opnsense/core/pull/8046)
o align "policy change for %s unlink group" with master (unlink when duplicates exists)
System: Access: Users - refactor to MVC (https://github.com/opnsense/core/issues/7904)
review comments from @Monviech
* "Create and Download API Key for this user" refresh apikeys bootgrid
* "Users" bootgrid, add some columns
* rename "Username" to "Group Name" in group edit
* Disable sorting the bootgrid by "Users" and "Groups" as these are aggregated/formatted columns
System: Access: Users - refactor to MVC (https://github.com/opnsense/core/issues/7904)
* add initial boilerplate
* unpack `<priv/>` field on first access
* unpack '<apikeys/>' field on first access and implement key actions into ApiKeyField
* add apikey grid in user management view
* change isset() to !empty() for users disabled flag in backend code
* move user atributes into dialog
* hook PrivField type to \OPNsense\Core\ACL()
* refactor Auth/API to use new User class
* otp seed logic with simple api call to generate new seeds and some JS glue for the frontend
* uid autonumber field
* language selector using get_locale_list() via configd (cached)
* add StoreB64Field field for authorizedkeys so we can keep the field contents backwards compatible.
* ExpiresField for custom date parsing, supporting previous input formats as well.
* group membership using a volatile custom field type, controller is responisble for persisting the configuration data to avoid entanglement between models
* add button which links to most likely user certs (based on commonname), to avoid all sorts of magic to reflect certs back into the usermanager.
* add getUserPrivs() to model so we can fetch a full list of privs for a user
* show user icons, long this might be less relevant
[10 lines not shown]