(b Subject)
| 140 | } |
| 141 | |
| 142 | func (s Subject) Equal(b Subject) bool { |
| 143 | if s.ID != b.ID { |
| 144 | return false |
| 145 | } |
| 146 | |
| 147 | if !slice.SameElements(s.Groups, b.Groups) { |
| 148 | return false |
| 149 | } |
| 150 | |
| 151 | if !slice.SameElements(s.SafeRoleNames(), b.SafeRoleNames()) { |
| 152 | return false |
| 153 | } |
| 154 | |
| 155 | if s.SafeScopeName() != b.SafeScopeName() { |
| 156 | return false |
| 157 | } |
| 158 | return true |
| 159 | } |
| 160 | |
| 161 | // SafeScopeName prevent nil pointer dereference. |
| 162 | func (s Subject) SafeScopeName() string { |
nothing calls this directly
no test coverage detected