prepare release 1.13 (#2290)
* make voters a final class * upgrade dependencies * sort project alphabetically in dashboard widget * open detail page on row click * do not break on null tag name * added max height to scrollable widgets on dashboard * added timesheet duplicate event * allow to deactivate browser title update * improve comment box * moved role permissions to own menu * removed tabs in user screen * fix user can remove super-admin from own account
This commit is contained in:
@@ -51,7 +51,7 @@ class Tag
|
||||
*
|
||||
* @ORM\Column(name="name", type="string", length=100, nullable=false)
|
||||
* @Assert\NotBlank()
|
||||
* @Assert\Length(min=2, max=100, allowEmptyString=false)
|
||||
* @Assert\Length(min=2, max=100, allowEmptyString=false, normalizer="trim")
|
||||
* @Assert\Regex(pattern="/,/",match=false,message="Tag name cannot contain comma")
|
||||
*/
|
||||
private $name;
|
||||
@@ -77,7 +77,7 @@ class Tag
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setName(string $tagName): Tag
|
||||
public function setName(?string $tagName): Tag
|
||||
{
|
||||
$this->name = $tagName;
|
||||
|
||||
|
||||
@@ -439,6 +439,18 @@ class User extends BaseUser implements UserInterface
|
||||
return !$this->getTeams()->isEmpty();
|
||||
}
|
||||
|
||||
public function hasTeamMember(User $user): bool
|
||||
{
|
||||
/** @var Team $team */
|
||||
foreach ($this->getTeams() as $team) {
|
||||
if ($team->hasUser($user)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<Team>
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user