EAREqual checks if two subjects are equal
(s1, s2 *base.EntityAndRelation)
| 48 | |
| 49 | // EAREqual checks if two subjects are equal |
| 50 | func EAREqual(s1, s2 *base.EntityAndRelation) bool { |
| 51 | return s1.GetRelation() == s2.GetRelation() && s1.GetEntity().GetId() == s2.GetEntity().GetId() && s1.GetEntity().GetType() == s2.GetEntity().GetType() |
| 52 | } |
| 53 | |
| 54 | // SubjectToEAR converts a Subject object to an EntityAndRelation object |
| 55 | func SubjectToEAR(subject *base.Subject) *base.EntityAndRelation { |
no test coverage detected