admin roles should be able to retrieve any secret
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-04-05 10:42:35 +10:00
parent 1f80d0b9ad
commit 70f8103901
3 changed files with 41 additions and 17 deletions

View File

@@ -51,7 +51,7 @@ func StoreSecret(c *gin.Context) {
}
// If this secret already exists in the database then generate an error
checkExists, err := models.GetSecrets(&s)
checkExists, err := models.GetSecrets(&s, false)
if err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
return
@@ -118,7 +118,7 @@ func UpdateSecret(c *gin.Context) {
}
// Confirm that the secret already exists
checkExists, err := models.GetSecrets(&s)
checkExists, err := models.GetSecrets(&s, false)
if err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
return