feat: add salary privilege to privilege management system
Add support for the salary privilege in the privilege handler. Implement associated logic to process and validate the salary privilege in the test cases. Update the data structures to include the new privilege and ensure correct functionality in the privilege processing flow.
This commit is contained in:
@@ -20,6 +20,7 @@ type CompanyPrivileges struct {
|
||||
Invoicing bool `json:"invoicing"`
|
||||
Accounting bool `json:"accounting"`
|
||||
Supplier bool `json:"supplier"`
|
||||
Salary bool `json:"salary"`
|
||||
}
|
||||
|
||||
// PrivilegeHandler processes PrivilegeAdded-events and fetches the initial set of privileges from an authz-service
|
||||
@@ -139,6 +140,8 @@ func (h *PrivilegeHandler) setPrivileges(email, companyId string, privilege Priv
|
||||
c.Accounting = set
|
||||
case PrivilegeSupplier:
|
||||
c.Supplier = set
|
||||
case PrivilegeSalary:
|
||||
c.Salary = set
|
||||
}
|
||||
} else {
|
||||
priv[companyId] = &CompanyPrivileges{}
|
||||
|
||||
Reference in New Issue
Block a user