mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-11 04:44:46 +00:00
New user groups and memberships
This commit is contained in:
28
app/User.php
28
app/User.php
@@ -34,6 +34,7 @@ use FireflyIII\Models\Bill;
|
||||
use FireflyIII\Models\Budget;
|
||||
use FireflyIII\Models\Category;
|
||||
use FireflyIII\Models\CurrencyExchangeRate;
|
||||
use FireflyIII\Models\GroupMembership;
|
||||
use FireflyIII\Models\ObjectGroup;
|
||||
use FireflyIII\Models\PiggyBank;
|
||||
use FireflyIII\Models\Preference;
|
||||
@@ -136,14 +137,14 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
* @method static Builder|User whereObjectguid($value)
|
||||
* @property string|null $provider
|
||||
* @method static Builder|User whereProvider($value)
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|ObjectGroup[] $objectGroups
|
||||
* @property-read int|null $object_groups_count
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|Webhook[] $webhooks
|
||||
* @property-read int|null $webhooks_count
|
||||
* @property string|null $two_factor_secret
|
||||
* @property string|null $two_factor_recovery_codes
|
||||
* @property string|null $guid
|
||||
* @property string|null $domain
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|ObjectGroup[] $objectGroups
|
||||
* @property-read int|null $object_groups_count
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|Webhook[] $webhooks
|
||||
* @property-read int|null $webhooks_count
|
||||
* @property string|null $two_factor_secret
|
||||
* @property string|null $two_factor_recovery_codes
|
||||
* @property string|null $guid
|
||||
* @property string|null $domain
|
||||
* @method static Builder|User whereDomain($value)
|
||||
* @method static Builder|User whereGuid($value)
|
||||
* @method static Builder|User whereTwoFactorRecoveryCodes($value)
|
||||
@@ -212,6 +213,16 @@ class User extends Authenticatable
|
||||
return $this->hasMany(Account::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @return HasMany
|
||||
*/
|
||||
public function groupMemberships(): HasMany
|
||||
{
|
||||
return $this->hasMany(GroupMembership::class)->with(['userGroup','userRole']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @codeCoverageIgnore
|
||||
* Link to attachments
|
||||
@@ -449,6 +460,7 @@ class User extends Authenticatable
|
||||
}
|
||||
|
||||
// start LDAP related code
|
||||
|
||||
/**
|
||||
* Get the database column name of the domain.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user