Skip to content

Commit

Permalink
Merge branch 'development' into dev-wilco
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoLouwerse committed Oct 26, 2020
2 parents 13a4508 + 129fcea commit 37e9ca0
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 33 deletions.
Binary file modified api/helm/id-vault-0.1.0.tgz
Binary file not shown.
6 changes: 3 additions & 3 deletions api/helm/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ entries:
id-vault:
- apiVersion: v1
appVersion: V1.0
created: "2020-10-26T12:46:22.1302755Z"
created: "2020-10-26T15:32:51.2323743Z"
description: Naast deze JSON rest API is er ook een [graphql](/graphql) interface
beschikbaar.
digest: 7d5518e3c77dd9a6dc3eea249c02acdb7c68ff28ca89d5095483dce49962d56e
digest: 9d8ec7a00b8963e9262e928f3423081ee57d37c324525e91cb1c5234225278a6
home: www.id-vault.com
icon: www.id-vault.com
name: id-vault
urls:
- id-vault-0.1.0.tgz
version: 0.1.0
generated: "2020-10-26T12:46:22.1209266Z"
generated: "2020-10-26T15:32:51.2252936Z"
8 changes: 4 additions & 4 deletions api/public/schema/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2391,12 +2391,12 @@ definitions:
description: 'The moment this request was created'
type: string
format: date-time
example: '2020-10-26 12:47:10'
example: '2020-10-26 15:33:38'
dateModified:
description: 'The moment this request last Modified'
type: string
format: date-time
example: '2020-10-26 12:47:10'
example: '2020-10-26 15:33:38'
required: []
AuditTrail-write:
properties:
Expand Down Expand Up @@ -2444,12 +2444,12 @@ definitions:
description: 'The moment this request was created'
type: string
format: date-time
example: '2020-10-26 12:47:10'
example: '2020-10-26 15:33:38'
dateModified:
description: 'The moment this request last Modified'
type: string
format: date-time
example: '2020-10-26 12:47:10'
example: '2020-10-26 15:33:38'
required: []
ChangeLog-write:
properties:
Expand Down
24 changes: 24 additions & 0 deletions api/src/Controller/DashboardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,30 @@ public function organizationsAction(Session $session, Request $request, CommonGr
}

$wrc = $commonGroundService->createResource($wrc, ['component' => 'wrc', 'type' => 'organizations']);

$userGroup = [];
$userGroup['name'] = $name;
$userGroup['title'] = $name;
$userGroup['description'] = 'group for '.$name;
$userGroup['organization'] = $commonGroundService->cleanUrl(['component' => 'wrc', 'type' => 'organizations', 'id' => $wrc['id']]);

$group = $commonGroundService->createResource($userGroup, ['component' => 'uc', 'type' => 'groups']);

$users = $commonGroundService->getResourceList(['component' => 'uc', 'type' => 'users'], ['username' => $this->getUser()->getUsername()])['hydra:member'];
if (count($users) > 0) {
$organizations = [];
$user = $users[0];

$userGroups = [];
foreach ($user['userGroups'] as $userGroup) {
array_push($userGroups, '/groups/'.$userGroup['id']);
}

$user['userGroups'] = $userGroups;
$user['userGroups'][] = '/groups/'.$group['id'];

$commonGroundService->updateResource($user);
}
}

if ($this->getUser()) {
Expand Down
52 changes: 27 additions & 25 deletions api/templates/dashboard/general.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -91,42 +91,44 @@
</div>
</div>

<!-- Card -->
<div class="card card-bleed shadow-light-lg mb-6">
<div class="card-header">
{% if 'group.developer' not in app.user.roles %}
<!-- Card -->
<div class="card card-bleed shadow-light-lg mb-6">
<div class="card-header">

<!-- Heading -->
<h4 class="mb-0">
{{ 'become a developer!'|trans|capitalize }}
</h4>
<!-- Heading -->
<h4 class="mb-0">
{{ 'become a developer!'|trans|capitalize }}
</h4>

</div>
</div>

<div class="card-body">
<div class="card-body">

<!-- Form -->
<form action="{{ path('app_dashboard_general') }}" method="post">
<div class="row">
<div class="col-12 col-md-12">
<!-- Form -->
<form action="{{ path('app_dashboard_general') }}" method="post">
<div class="row">
<div class="col-12 col-md-12">

<p>
{{ 'Are you an application developer? And are your hands itching to get started with id-vault? Then all you have to do is turn on the developer view, you can do that by using the slider in your personal settings or by pressing this button.'|trans }}
</p>
<p>
{{ 'Are you an application developer? And are your hands itching to get started with id-vault? Then all you have to do is turn on the developer view, you can do that by using the slider in your personal settings or by pressing this button.'|trans }}
</p>

</div>
<div class="col-12 col-md-auto">
</div>
<div class="col-12 col-md-auto">

<!-- Button -->
<button class="btn btn-block btn-primary" type="submit">
{{ 'become a developer!'|trans|capitalize }}
</button>
<!-- Button -->
<button class="btn btn-block btn-primary" type="submit">
{{ 'become a developer!'|trans|capitalize }}
</button>

</div>
</div>
</div>
</form>
</form>

</div>
</div>
</div>
{% endif %}

</div>
</div> <!-- / .row -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

<!-- Submit -->
<button class="btn btn-block btn-primary mt-3 lift">
{{ 'add organization' }}
{{ 'add organization'|trans|capitalize }}
</button>

</form>
Expand Down
2 changes: 2 additions & 0 deletions api/templates/dashboard/organizations.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@
<thead>
<tr>
<th scope="col">{{ 'name'|trans|capitalize }}</th>
<th></th>
</tr>
</thead>
<tbody>
{% for resource in resources %}
<tr>
<td>{{ resource.name }}</td>
<td style="text-align: end"><a class="btn btn-xs btn-primary" href="">Open</a></td>
</tr>
{% endfor %}
</tbody>
Expand Down

0 comments on commit 37e9ca0

Please sign in to comment.