mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
16 lines
346 B
Go
16 lines
346 B
Go
|
package authorization
|
||
|
|
||
|
import (
|
||
|
"regexp"
|
||
|
)
|
||
|
|
||
|
// AccessControlResource represents an ACL resource.
|
||
|
type AccessControlResource struct {
|
||
|
Pattern *regexp.Regexp
|
||
|
}
|
||
|
|
||
|
// IsMatch returns true if the ACL resource match the object path.
|
||
|
func (acr AccessControlResource) IsMatch(object Object) (match bool) {
|
||
|
return acr.Pattern.MatchString(object.Path)
|
||
|
}
|