Skip to content
Snippets Groups Projects
Commit 1a65e7c7 authored by Eirik Morland's avatar Eirik Morland
Browse files

Issue #3356369 by eiriksm: Implement dynamic max repos for enterprise plan

parent 69d5cd0c
No related branches found
No related tags found
1 merge request!13Issue #3356369: Implement dynamic max repos for enterprise plan
......@@ -36,6 +36,12 @@ class TeamNode extends Node {
}
$plan_value = $this->get('field_plan')->first()->getString();
switch ($plan_value) {
case PlanInterface::ENTERPRISE_PLAN:
$plan = new Plan($plan_value);
// Usually we are required to set what the max is on the team level.
$plan->setMaxPrivateRepos($this->getMaxPrivateRepos());
return $plan;
case PlanInterface::PREMIUM_PLAN:
return new Plan($plan_value);
......@@ -150,6 +156,7 @@ class TeamNode extends Node {
* deleted ones, for example. Or about to be deleted.
*
* @return \Drupal\user\UserInterface[]
* All of those users.
*/
public function getMembers() : array {
return $this->get(self::MEMBERS_FIELD)->referencedEntities();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment