Authorize returns true if the user has as good as desired access mode to the repository.
(ctx context.Context, userID, repoID int64, desired AccessMode, opts AccessModeOptions)
| 105 | // Authorize returns true if the user has as good as desired access mode to the |
| 106 | // repository. |
| 107 | func (s *PermissionsStore) Authorize(ctx context.Context, userID, repoID int64, desired AccessMode, opts AccessModeOptions) bool { |
| 108 | return desired <= s.AccessMode(ctx, userID, repoID, opts) |
| 109 | } |
| 110 | |
| 111 | // SetRepoPerms does a full update to which users have which level of access to |
| 112 | // given repository. Keys of the "accessMap" are user IDs. |