code: func PermissionGuard(perm pinterface.IPermissions) iris.Handler {
  	return func(ctx iris.Context) {
  		// Check if the user has the right admin/user rights
  		if perm.Rejected(ctx.ResponseWriter(), ctx.Request()) {
  			// Stop the request for executing further
  			ctx.StopExecution()
  			// Let the user know, by calling the custom "permission denied" function
  			perm.DenyFunction()(ctx.ResponseWriter(), ctx.Request())
  			return
  		}
  		// Serve the next handler if permissions were granted
  		ctx.Next()
  	}
  }
docs: // PermissionGuard returns an new iris.Handler function that
  // uses the given perm value to reject or accept HTTP requests.
  // `pinterface.IPermissions` is used instead of `*permissions.Permissions`
  // in order to be compatible with not only `permissionbolt`, but also
  // other database backends, like `permissions2`, which uses Redis.