Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SIGPUBLIC
unantes-orientation-active
Commits
c987c375
Commit
c987c375
authored
Apr 12, 2021
by
Kevin Robert
Browse files
Prise en compte des remarques de PR et corrections suite à la mise à jour de Jhipster.
parent
ea1460a1
Changes
20
Hide whitespace changes
Inline
Side-by-side
src/main/java/com/unantes/orientactive/security/permissions/PermissionService.java
View file @
c987c375
package
com.unantes.orientactive.security.permissions
;
import
com.unantes.orientactive.domain.User
;
import
com.unantes.orientactive.service.dto.UserDTO
;
import
java.util.List
;
import
java.util.Optional
;
import
com.unantes.orientactive.service.dto.AdminUserDTO
;
import
org.springframework.security.core.Authentication
;
import
org.springframework.security.core.authority.SimpleGrantedAuthority
;
import
org.springframework.security.core.context.SecurityContextHolder
;
import
java.util.List
;
import
java.util.Optional
;
/**
* Abstraction des services comprenant la gestion des permissions.
* Oblige l'implémentation des méthodes de gestion des droits.
...
...
@@ -113,7 +114,7 @@ public abstract class PermissionService<T extends PermissionEntity> {
* @param element L'élément.
* @return La liste des utilisateurs.
*/
public
abstract
List
<
UserDTO
>
findAllWithPermission
(
T
element
);
public
abstract
List
<
Admin
UserDTO
>
findAllWithPermission
(
T
element
);
/**
* Méthode interne permettant de récupérer les entités que l'utilisateur a la permission d'administer.
...
...
src/main/java/com/unantes/orientactive/security/permissions/web/PermissionController.java
View file @
c987c375
...
...
@@ -4,13 +4,14 @@ import com.unantes.orientactive.domain.User;
import
com.unantes.orientactive.security.permissions.PermissionEntity
;
import
com.unantes.orientactive.security.permissions.PermissionService
;
import
com.unantes.orientactive.service.UserService
;
import
com.unantes.orientactive.service.dto.UserDTO
;
import
com.unantes.orientactive.service.dto.AdminUserDTO
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
java.util.Collections
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Optional
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
/**
* Mutualisation de la mise en place de l'API des permissions.
...
...
@@ -179,9 +180,9 @@ public abstract class PermissionController {
* @return La liste des utilisateurs.
*/
@GetMapping
(
"/findAllWithPermission/{idEntity}"
)
public
List
<
UserDTO
>
findAllWithPermission
(
@PathVariable
final
long
idEntity
)
{
public
List
<
Admin
UserDTO
>
findAllWithPermission
(
@PathVariable
final
long
idEntity
)
{
final
Optional
<
PermissionEntity
>
entity
=
permissionService
.
findOne
(
idEntity
);
List
<
UserDTO
>
users
=
new
LinkedList
<>();
List
<
Admin
UserDTO
>
users
=
new
LinkedList
<>();
if
(
entity
.
isPresent
())
{
users
=
permissionService
.
findAllWithPermission
(
entity
.
get
());
}
...
...
src/main/java/com/unantes/orientactive/service/FormService.java
View file @
c987c375
...
...
@@ -6,19 +6,20 @@ import com.unantes.orientactive.repository.FormRepository;
import
com.unantes.orientactive.security.permissions.PermissionEntity
;
import
com.unantes.orientactive.security.permissions.PermissionService
;
import
com.unantes.orientactive.security.permissions.Role
;
import
com.unantes.orientactive.service.dto.AdminUserDTO
;
import
com.unantes.orientactive.service.dto.FormDTO
;
import
com.unantes.orientactive.service.dto.UserDTO
;
import
com.unantes.orientactive.service.mapper.FormMapper
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
/**
* Service Implementation for managing {@link Form}.
*/
...
...
@@ -201,7 +202,7 @@ public class FormService extends PermissionService<FormDTO> {
}
@Override
public
List
<
UserDTO
>
findAllWithPermission
(
FormDTO
element
)
{
public
List
<
Admin
UserDTO
>
findAllWithPermission
(
FormDTO
element
)
{
return
userService
.
findAllWithPermissionOnForm
(
Role
.
CONTRIBUTEUR
.
getId
(),
element
.
getId
());
}
...
...
src/main/java/com/unantes/orientactive/service/UserService.java
View file @
c987c375
...
...
@@ -9,10 +9,6 @@ import com.unantes.orientactive.security.AuthoritiesConstants;
import
com.unantes.orientactive.security.SecurityUtils
;
import
com.unantes.orientactive.service.dto.AdminUserDTO
;
import
com.unantes.orientactive.service.dto.UserDTO
;
import
java.time.Instant
;
import
java.time.temporal.ChronoUnit
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.cache.CacheManager
;
...
...
@@ -24,6 +20,15 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
tech.jhipster.security.RandomUtil
;
import
java.time.Instant
;
import
java.time.temporal.ChronoUnit
;
import
java.util.HashSet
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.Optional
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
/**
* Service class for managing users.
*/
...
...
@@ -299,8 +304,8 @@ public class UserService {
}
@Transactional
(
readOnly
=
true
)
public
List
<
UserDTO
>
getAllManagedUsers
()
{
return
userRepository
.
findAll
ByLoginNot
(
Constants
.
ANONYMOUS_USER
).
stream
().
map
(
UserDTO:
:
new
).
collect
(
Collectors
.
toList
());
public
List
<
Admin
UserDTO
>
getAllManagedUsers
()
{
return
userRepository
.
findAll
(
).
stream
().
map
(
Admin
UserDTO:
:
new
).
collect
(
Collectors
.
toList
());
}
@Transactional
(
readOnly
=
true
)
...
...
@@ -381,12 +386,12 @@ public class UserService {
}
}
public
List
<
UserDTO
>
findAllWithPermissionOnWorkspace
(
final
int
idRole
,
final
Long
idWorkspace
)
{
return
userRepository
.
findAllWithPermissionOnWorkspace
(
idRole
,
idWorkspace
).
stream
().
map
(
UserDTO:
:
new
).
collect
(
Collectors
.
toList
());
public
List
<
Admin
UserDTO
>
findAllWithPermissionOnWorkspace
(
final
int
idRole
,
final
Long
idWorkspace
)
{
return
userRepository
.
findAllWithPermissionOnWorkspace
(
idRole
,
idWorkspace
).
stream
().
map
(
Admin
UserDTO:
:
new
).
collect
(
Collectors
.
toList
());
}
public
List
<
UserDTO
>
findAllWithPermissionOnForm
(
final
int
idRole
,
final
Long
idForm
)
{
return
userRepository
.
findAllWithPermissionOnForm
(
idRole
,
idForm
).
stream
().
map
(
UserDTO:
:
new
).
collect
(
Collectors
.
toList
());
public
List
<
Admin
UserDTO
>
findAllWithPermissionOnForm
(
final
int
idRole
,
final
Long
idForm
)
{
return
userRepository
.
findAllWithPermissionOnForm
(
idRole
,
idForm
).
stream
().
map
(
Admin
UserDTO:
:
new
).
collect
(
Collectors
.
toList
());
}
public
List
<
String
>
findAllAuthorities
(
Long
idUser
)
{
...
...
src/main/java/com/unantes/orientactive/service/WorkspaceService.java
View file @
c987c375
...
...
@@ -6,6 +6,7 @@ import com.unantes.orientactive.repository.WorkspaceRepository;
import
com.unantes.orientactive.security.permissions.PermissionEntity
;
import
com.unantes.orientactive.security.permissions.PermissionService
;
import
com.unantes.orientactive.security.permissions.Role
;
import
com.unantes.orientactive.service.dto.AdminUserDTO
;
import
com.unantes.orientactive.service.dto.UserDTO
;
import
com.unantes.orientactive.service.dto.WorkspaceDTO
;
import
com.unantes.orientactive.service.mapper.WorkspaceMapper
;
...
...
@@ -163,7 +164,7 @@ public class WorkspaceService extends PermissionService<WorkspaceDTO> {
}
@Override
public
List
<
UserDTO
>
findAllWithPermission
(
WorkspaceDTO
element
)
{
public
List
<
Admin
UserDTO
>
findAllWithPermission
(
WorkspaceDTO
element
)
{
return
userService
.
findAllWithPermissionOnWorkspace
(
Role
.
RESPONSABLE_ESPACE
.
getId
(),
element
.
getId
());
}
...
...
src/main/java/com/unantes/orientactive/web/rest/AccountResource.java
View file @
c987c375
...
...
@@ -7,18 +7,26 @@ import com.unantes.orientactive.service.MailService;
import
com.unantes.orientactive.service.UserService
;
import
com.unantes.orientactive.service.dto.AdminUserDTO
;
import
com.unantes.orientactive.service.dto.PasswordChangeDTO
;
import
com.unantes.orientactive.service.dto.UserDTO
;
import
com.unantes.orientactive.web.rest.errors.*
;
import
com.unantes.orientactive.web.rest.errors.EmailAlreadyUsedException
;
import
com.unantes.orientactive.web.rest.errors.InvalidPasswordException
;
import
com.unantes.orientactive.web.rest.errors.LoginAlreadyUsedException
;
import
com.unantes.orientactive.web.rest.vm.KeyAndPasswordVM
;
import
com.unantes.orientactive.web.rest.vm.ManagedUserVM
;
import
java.util.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.validation.Valid
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseStatus
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.validation.Valid
;
import
java.util.Optional
;
/**
* REST controller for managing the current user's account.
...
...
src/main/java/com/unantes/orientactive/web/rest/UserResource.java
View file @
c987c375
...
...
@@ -169,7 +169,7 @@ public class UserResource {
*/
@GetMapping
(
"/users"
)
@PreAuthorize
(
"hasAuthority(\""
+
AuthoritiesConstants
.
ADMIN
+
"\")"
)
public
ResponseEntity
<
List
<
UserDTO
>>
getAllUsers
()
{
public
ResponseEntity
<
List
<
Admin
UserDTO
>>
getAllUsers
()
{
return
new
ResponseEntity
<>(
userService
.
getAllManagedUsers
(),
HttpStatus
.
OK
);
}
...
...
@@ -196,10 +196,11 @@ public class UserResource {
* @param id the id of the user to find.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the "login" user, or with status {@code 404 (Not Found)}.
*/
@GetMapping
(
"/users/{id}"
)
public
ResponseEntity
<
UserDTO
>
getUserById
(
@PathVariable
Long
id
)
{
@GetMapping
(
"/users/id/{id}"
)
@PreAuthorize
(
"hasAuthority(\""
+
AuthoritiesConstants
.
ADMIN
+
"\")"
)
public
ResponseEntity
<
AdminUserDTO
>
getUserById
(
@PathVariable
Long
id
)
{
log
.
debug
(
"REST request to get User : {}"
,
id
);
return
ResponseUtil
.
wrapOrNotFound
(
userService
.
getUserWithAuthoritiesById
(
id
).
map
(
UserDTO:
:
new
));
return
ResponseUtil
.
wrapOrNotFound
(
userService
.
getUserWithAuthoritiesById
(
id
).
map
(
Admin
UserDTO:
:
new
));
}
/**
...
...
src/main/webapp/app/admin/user-management/user-management.service.ts
View file @
c987c375
...
...
@@ -5,30 +5,30 @@ import { Authority } from '@/shared/security/authority';
export
default
class
UserManagementService
{
public
get
(
userId
:
number
):
Promise
<
any
>
{
return
axios
.
get
(
`api/users/
${
userId
}
`
);
return
axios
.
get
(
`api/
admin/
users/
id/
${
userId
}
`
);
}
public
create
(
user
):
Promise
<
any
>
{
return
axios
.
post
(
'
api/users
'
,
user
);
return
axios
.
post
(
'
api/
admin/
users
'
,
user
);
}
public
update
(
user
):
Promise
<
any
>
{
return
axios
.
put
(
'
api/users
'
,
user
);
return
axios
.
put
(
'
api/
admin/
users
'
,
user
);
}
public
remove
(
userId
:
number
):
Promise
<
any
>
{
return
axios
.
delete
(
`api/users/
${
userId
}
`
);
return
axios
.
delete
(
`api/
admin/
users/
${
userId
}
`
);
}
public
retrieve
(
req
?:
any
):
Promise
<
any
>
{
return
axios
.
get
(
`api/users?
${
buildPaginationQueryOpts
(
req
)}
`
);
return
axios
.
get
(
`api/
admin/
users?
${
buildPaginationQueryOpts
(
req
)}
`
);
}
public
retrieveAllManagedUsers
():
Promise
<
any
>
{
return
axios
.
get
(
`api/users`
);
return
axios
.
get
(
`api/
admin/
users`
);
}
public
retrieveAuthorities
():
Promise
<
any
>
{
return
axios
.
get
(
'
api/users/authorities
'
);
return
axios
.
get
(
'
api/
admin/
users/authorities
'
);
}
}
src/main/webapp/app/entities/form/form.service.ts
View file @
c987c375
...
...
@@ -34,7 +34,7 @@ export default class FormService {
public
retrieveWithPermission
(
login
:
string
,
workspaceId
:
number
):
Promise
<
any
>
{
return
new
Promise
<
any
>
((
resolve
,
reject
)
=>
{
axios
.
get
(
baseApiUrl
+
'
/find/
'
+
login
+
'
/
'
+
workspaceId
)
.
get
(
`
${
baseApiUrl
}
/find/
${
login
}
/
${
workspaceId
}
`
)
.
then
(
res
=>
{
resolve
(
res
);
})
...
...
@@ -47,7 +47,7 @@ export default class FormService {
public
findAllWithPermission
(
idEntity
:
number
):
Promise
<
any
>
{
return
new
Promise
<
any
>
((
resolve
,
reject
)
=>
{
axios
.
get
(
baseApiUrl
+
'
/findAllWithPermission/
'
+
idEntity
)
.
get
(
`
${
baseApiUrl
}
/findAllWithPermission/
${
idEntity
}
`
)
.
then
(
res
=>
{
resolve
(
res
);
})
...
...
@@ -99,7 +99,7 @@ export default class FormService {
public
export
(
entity
:
IForm
):
Promise
<
any
>
{
return
new
Promise
<
any
>
((
resolve
,
reject
)
=>
{
axios
.
get
(
baseApiUrl
+
'
/export/
'
+
entity
.
reference
)
.
get
(
`
${
baseApiUrl
}
/export/
${
entity
.
reference
}
`
)
.
then
(
res
=>
{
resolve
(
res
);
})
...
...
src/main/webapp/app/entities/workspace/workspace.service.ts
View file @
c987c375
...
...
@@ -34,7 +34,7 @@ export default class WorkspaceService {
public
retrieveWithPermission
(
login
:
string
):
Promise
<
any
>
{
return
new
Promise
<
any
>
((
resolve
,
reject
)
=>
{
axios
.
get
(
baseApiUrl
+
'
/find/
'
+
login
)
.
get
(
`
${
baseApiUrl
}
/find/
${
login
}
`
)
.
then
(
res
=>
{
resolve
(
res
);
})
...
...
@@ -47,7 +47,7 @@ export default class WorkspaceService {
public
findAllWithPermission
(
idEntity
:
number
):
Promise
<
any
>
{
return
new
Promise
<
any
>
((
resolve
,
reject
)
=>
{
axios
.
get
(
baseApiUrl
+
'
/findAllWithPermission/
'
+
idEntity
)
.
get
(
`
${
baseApiUrl
}
/findAllWithPermission/
${
idEntity
}
`
)
.
then
(
res
=>
{
resolve
(
res
);
})
...
...
src/main/webapp/app/views/form/form-creation.component.ts
View file @
c987c375
import
Vue
from
'
vue
'
;
import
Component
from
'
vue-class-component
'
;
import
{
Inject
}
from
"
vue-property-decorator
"
;
import
OaInput
from
"
@/components/forms/input/oa-input.vue
"
;
import
OaTextarea
from
"
@/components/forms/textarea/oa-textarea.vue
"
;
import
OaButton
from
"
@/components/button/oa-button.vue
"
;
import
{
Form
}
from
"
@/shared/model/form.model
"
;
import
FormService
from
"
@/entities/form/form.service
"
;
import
{
Inject
}
from
'
vue-property-decorator
'
;
import
OaInput
from
'
@/components/forms/input/oa-input.vue
'
;
import
OaTextarea
from
'
@/components/forms/textarea/oa-textarea.vue
'
;
import
OaButton
from
'
@/components/button/oa-button.vue
'
;
import
{
Form
}
from
'
@/shared/model/form.model
'
;
import
FormService
from
'
@/entities/form/form.service
'
;
@
Component
({
...
...
src/main/webapp/app/views/form/form-settings.component.ts
View file @
c987c375
...
...
@@ -60,6 +60,10 @@ export default class FormSettings extends Vue {
});
}
public
getUserEditLink
(
userId
:
String
)
{
return
`/admin/user/
${
userId
}
/edit`
;
}
setName
(
name
:
String
)
{
this
.
form
.
name
=
name
;
}
...
...
src/main/webapp/app/views/form/form-settings.vue
View file @
c987c375
...
...
@@ -21,10 +21,10 @@
</thead>
<tbody>
<tr
v-for=
"(user, index) in authorizedUsers"
class=
"text-left align-top border-b"
>
<td
class=
"p-2"
><a
:href=
"
'/admin/user/' + user.id + '/edit'
"
>
{{
user
.
id
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
'/admin/user/' + user.id + '/edit'
"
>
{{
user
.
firstName
}}
{{
user
.
lastName
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
'/admin/user/' + user.id + '/edit'
"
>
{{
user
.
email
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
'/admin/user/' + user.id + '/edit'
"
>
{{
user
.
activated
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
getUserEditLink(user.id)
"
>
{{
user
.
id
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
getUserEditLink(user.id)
"
>
{{
user
.
firstName
}}
{{
user
.
lastName
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
getUserEditLink(user.id)
"
>
{{
user
.
email
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
getUserEditLink(user.id)
"
>
{{
user
.
activated
}}
</a></td>
</tr>
</tbody>
</table>
...
...
src/main/webapp/app/views/user/user-edit.component.ts
View file @
c987c375
import
Vue
from
'
vue
'
;
import
Component
from
'
vue-class-component
'
;
import
OaInput
from
'
@/components/forms/input/oa-input.vue
'
;
import
{
Inject
}
from
"
vue-property-decorator
"
;
import
{
Inject
}
from
'
vue-property-decorator
'
;
import
UserManagementService
from
'
@/admin/user-management/user-management.service
'
;
import
{
IUser
,
User
}
from
"
@/shared/model/user.model
"
;
import
{
IUser
,
User
}
from
'
@/shared/model/user.model
'
;
import
OaButton
from
'
@/components/button/oa-button.vue
'
;
@
Component
({
...
...
src/main/webapp/app/views/user/user-list.component.ts
View file @
c987c375
import
Vue
from
'
vue
'
;
import
Component
from
'
vue-class-component
'
;
import
Toolbar
from
'
@/components/toolbar/toolbar.vue
'
;
import
{
Inject
}
from
"
vue-property-decorator
"
;
import
UserManagementService
from
"
@/admin/user-management/user-management.service
"
;
import
{
Inject
}
from
'
vue-property-decorator
'
;
import
UserManagementService
from
'
@/admin/user-management/user-management.service
'
;
@
Component
({
components
:
{
...
...
@@ -27,4 +27,8 @@ export default class UserList extends Vue {
this
.
users
=
res
.
data
;
});
}
public
getUserEditLink
(
userId
:
String
)
{
return
`/admin/user/
${
userId
}
/edit`
;
}
}
src/main/webapp/app/views/user/user-list.vue
View file @
c987c375
...
...
@@ -13,10 +13,10 @@
</thead>
<tbody>
<tr
v-for=
"(user, index) in users"
class=
"text-left align-top border-b"
>
<td
class=
"p-2"
><a
:href=
"
'/admin/user/' + user.id + '/edit'
"
>
{{
user
.
id
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
'/admin/user/' + user.id + '/edit'
"
>
{{
user
.
firstName
}}
{{
user
.
lastName
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
'/admin/user/' + user.id + '/edit'
"
>
{{
user
.
email
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
'/admin/user/' + user.id + '/edit'
"
>
{{
user
.
activated
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
getUserEditLink(user.id)
"
>
{{
user
.
id
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
getUserEditLink(user.id)
"
>
{{
user
.
firstName
}}
{{
user
.
lastName
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
getUserEditLink(user.id)
"
>
{{
user
.
email
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
getUserEditLink(user.id)
"
>
{{
user
.
activated
}}
</a></td>
</tr>
</tbody>
</table>
...
...
src/main/webapp/app/views/workspace/workspace-creation.component.ts
View file @
c987c375
...
...
@@ -2,9 +2,9 @@ import Vue from 'vue';
import
Component
from
'
vue-class-component
'
;
import
OaInput
from
'
@/components/forms/input/oa-input.vue
'
;
import
OaTextarea
from
'
@/components/forms/textarea/oa-textarea.vue
'
;
import
{
Inject
}
from
"
vue-property-decorator
"
;
import
WorkspaceService
from
"
@/entities/workspace/workspace.service
"
;
import
Workspace
from
"
@/shared/model/workspace.model
"
;
import
{
Inject
}
from
'
vue-property-decorator
'
;
import
WorkspaceService
from
'
@/entities/workspace/workspace.service
'
;
import
Workspace
from
'
@/shared/model/workspace.model
'
;
import
OaButton
from
'
@/components/button/oa-button.vue
'
;
@
Component
({
...
...
src/main/webapp/app/views/workspace/workspace-settings.component.ts
View file @
c987c375
...
...
@@ -60,6 +60,10 @@ export default class WorkspaceSettings extends Vue {
});
}
public
getUserEditLink
(
userId
:
String
)
{
return
`/admin/user/
${
userId
}
/edit`
;
}
public
setName
(
name
:
String
)
{
this
.
workspace
.
name
=
name
;
}
...
...
src/main/webapp/app/views/workspace/workspace-settings.vue
View file @
c987c375
...
...
@@ -21,10 +21,10 @@
</thead>
<tbody>
<tr
v-for=
"(user, index) in authorizedUsers"
class=
"text-left align-top border-b"
>
<td
class=
"p-2"
><a
:href=
"
'/admin/user/' + user.id + '/edit'
"
>
{{
user
.
id
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
'/admin/user/' + user.id + '/edit'
"
>
{{
user
.
firstName
}}
{{
user
.
lastName
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
'/admin/user/' + user.id + '/edit'
"
>
{{
user
.
email
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
'/admin/user/' + user.id + '/edit'
"
>
{{
user
.
activated
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
getUserEditLink(user.id)
"
>
{{
user
.
id
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
getUserEditLink(user.id)
"
>
{{
user
.
firstName
}}
{{
user
.
lastName
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
getUserEditLink(user.id)
"
>
{{
user
.
email
}}
</a></td>
<td
class=
"p-2"
><a
:href=
"
getUserEditLink(user.id)
"
>
{{
user
.
activated
}}
</a></td>
</tr>
</tbody>
</table>
...
...
src/main/webapp/app/views/workspace/workspace-view.component.ts
View file @
c987c375
import
Vue
from
'
vue
'
;
import
Component
from
'
vue-class-component
'
;
import
{
Inject
}
from
"
vue-property-decorator
"
;
import
Card
from
"
@/components/card/card.vue
"
;
import
Toolbar
from
"
@/components/toolbar/toolbar.vue
"
;
import
FormService
from
"
@/entities/form/form.service
"
;
import
{
Inject
}
from
'
vue-property-decorator
'
;
import
Card
from
'
@/components/card/card.vue
'
;
import
Toolbar
from
'
@/components/toolbar/toolbar.vue
'
;
import
FormService
from
'
@/entities/form/form.service
'
;
@
Component
({
components
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment