Provide ability for admins to manage user organisation membership & admin rights

- Required overwriting a bunch of base code to slot in the handling
- Admins are shown with yellow text in their organisation label
This commit is contained in:
bwilliams committed 2022-02-08 18:10:20 +00:00
1 parent 609454def2
commit 9d62749914
14 files changed
+763 -1

No files matched your search

+1 -1
View File
@@ -37,7 +37,7 @@ class User extends UFUser
/** @var \UserFrosting\Sprinkle\Core\Util\ClassMapper $classMapper */
$classMapper = static::$ci->classMapper;
return $this->belongsToMany($classMapper->getClassMapping('organisation'), 'organisation_members', 'user_id', 'organisation_id');
return $this->belongsToMany($classMapper->getClassMapping('organisation'), 'organisation_members', 'user_id', 'organisation_id')->withPivot('flag_admin');;
}
/**