CanAccessField evaluates whether a specific field in the resource is allowed.
(field string)
| 177 | |
| 178 | // CanAccessField evaluates whether a specific field in the resource is allowed. |
| 179 | func (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. |
| 193 | func (r *ResolvedSecurity) RowFilter() string { |
nothing calls this directly
no test coverage detected