MCPcopy Create free account
hub / github.com/rilldata/rill / CanAccessField

Method CanAccessField

runtime/security.go:179–190  ·  view source on GitHub ↗

CanAccessField evaluates whether a specific field in the resource is allowed.

(field string)

Source from the content-addressed store, hash-verified

177
178// CanAccessField evaluates whether a specific field in the resource is allowed.
179func (r *ResolvedSecurity) CanAccessField(field string) bool {
180 if !r.CanAccess() {
181 return false
182 }
183
184 if r.CanAccessAllFields() {
185 return true
186 }
187
188 // If not explicitly allowed, it's an implicit deny
189 return r.fieldAccess[field]
190}
191
192// RowFilter returns a raw SQL expression to apply to the WHERE clause when querying the resource.
193func (r *ResolvedSecurity) RowFilter() string {

Callers

nothing calls this directly

Calls 2

CanAccessMethod · 0.95
CanAccessAllFieldsMethod · 0.95

Tested by

no test coverage detected