Skip to content

Commit

Permalink
Merge pull request #678 from openziti/canaccessshare_logging_bug
Browse files Browse the repository at this point in the history
CanAccessShare Logging & Permission Mode for Private Frontends (#677)
  • Loading branch information
michaelquigley authored Jun 25, 2024
2 parents e2746e6 + a2425f7 commit 5fe2530
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## v0.4.33

FIX: Fix for log message in `Agent.CanAccessShare` (`"account '#%d' over frontends per share limit '%d'"`), which was not returning the correct limit value.

FIX: Properly set `permission_mode` in `frontends` when createing a private frontend using `zrok access private` (https://github.com/openziti/zrok/issues/677)

CHANGE: Updated `react-bootstrap` to version `2.10.2` (web console).

CHANGE: Updated `@mui/material` to version `5.15.18` (web console).
Expand Down
2 changes: 1 addition & 1 deletion controller/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (h *accessHandler) Handle(params share.AccessParams, principal *rest_model_
return share.NewAccessInternalServerError()
}

if _, err := str.CreateFrontend(envId, &store.Frontend{PrivateShareId: &shr.Id, Token: feToken, ZId: envZId}, trx); err != nil {
if _, err := str.CreateFrontend(envId, &store.Frontend{PrivateShareId: &shr.Id, Token: feToken, ZId: envZId, PermissionMode: store.ClosedPermissionMode}, trx); err != nil {
logrus.Errorf("error creating frontend record for user '%v': %v", principal.Email, err)
return share.NewAccessInternalServerError()
}
Expand Down
2 changes: 1 addition & 1 deletion controller/limits/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (a *Agent) CanAccessShare(shrId int, trx *sqlx.Tx) (bool, error) {
return false, err
}
if len(fes)+1 > rc.GetShareFrontends() {
logrus.Infof("account '#%d' over frontends per share limit '%d'", *env.AccountId, rc.GetReservedShares())
logrus.Infof("account '#%d' over frontends per share limit '%d'", *env.AccountId, rc.GetShareFrontends())
return false, nil
}
}
Expand Down

0 comments on commit 5fe2530

Please sign in to comment.