mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-10-12 01:58:53 +02:00
add remove recipient disable mark\nimprove UI SCIM modal texts
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
1 parent
2c4a2533d9
commit
02f87b3e3a
5 files changed
+147
-16
No files matched your search
@@ -37,6 +37,29 @@ func (c *CompanyScimConfig) Prune(g *gin.Context) {
|
||||
c.Response.OK(g, gin.H{"pruned": pruned})
|
||||
}
|
||||
|
||||
// Restore clears the SCIM-disabled mark from the company's deprovisioned recipients.
|
||||
func (c *CompanyScimConfig) Restore(g *gin.Context) {
|
||||
session, _, ok := c.handleSession(g)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
companyID, err := uuid.Parse(g.Param("companyID"))
|
||||
if err != nil {
|
||||
c.Logger.Debugw("failed to parse companyID param", "error", err)
|
||||
c.Response.BadRequestMessage(g, errs.MsgFailedToParseUUID)
|
||||
return
|
||||
}
|
||||
restored, err := c.ScimService.RestoreSoftDeletedAuthorized(
|
||||
g.Request.Context(),
|
||||
session,
|
||||
&companyID,
|
||||
)
|
||||
if ok := c.handleErrors(g, err); !ok {
|
||||
return
|
||||
}
|
||||
c.Response.OK(g, gin.H{"restored": restored})
|
||||
}
|
||||
|
||||
// upsertScimRequest is the request body for the Upsert handler
|
||||
type upsertScimRequest struct {
|
||||
Enabled bool `json:"enabled"`
|
||||
|
||||
Reference in new issue
Block a user