lib/role_control/owned.rb
# NOTE: this owner data model adds complexity and fights the framework
# when trying to load data via relations...we should seriously consider
# how to remove this and simplify the owner relations (resource -> owner [:user]?)
#
# this method returns either the identity user or the owning group.
# It was setup this way to allow groups and users to own resources via IdentityGroups
this owner data model adds complexity and fights the framework
when trying to load data via relations...we should seriously consider
how to remove this and simplify the owner relations (resource -> owner [:user]?)

this method returns either the identity user or the owning group.
It was setup this way to allow groups and users to own resources via IdentityGroups
this owner data model adds complexity and fights the framework when trying to load data via relations ... we should seriously consider how to remove this and simplify the owner relations ( resource - > owner [ : user ] ? ) this method returns either the identity user or the owning group . It was setup this way to allow groups and users to own resources via IdentityGroups
def owner
        owner_group = super
        if owner_group&.identity?
          owner_group.identity_membership.user
        else
          owner_group
        end
      end
def owner owner_group = super if owner_group &. identity? owner_group . identity_membership . user else owner_group end end
NOTE: this owner data model adds complexity and fights the framework
when trying to load data via relations...we should seriously consider
how to remove this and simplify the owner relations (resource -> owner [:user]?)
NOTE : this owner data model adds complexity and fights the framework when trying to load data via relations ... we should seriously consider how to remove this and simplify the owner relations ( resource - > owner [ : user ] ? )
# trying to pre/eager load on relations other than owner does not work # when using this relation accessor override # ...and that makes me sad, it does work if you remove this owner override # but you lose the ability to return the correct owner resource... # ensure that this chained call matches the pre/eager loading setup