-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/rename workspace/47 #72
Conversation
…'GE-'/'U-' groups only
…ral homepage when reloading pages Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
it matching other more specific routes. Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
…ckend Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
Signed-off-by: Cyrille Bollu <cyr.debian@bollu.be>
…'GE-'/'U-' groups only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello Baptiste,
I've requested some changes
src/SpaceDetails.vue
Outdated
{{ t('workspace', 'Rename space') }} | ||
</ActionButton> | ||
@submit="renameSpace"> | ||
{{ t('workspace', 'Rename spaceAAAAA') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some old garbage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I corrected it !
src/SpaceDetails.vue
Outdated
// TODO | ||
const oldSpaceName = this.$root.$data.spaces[this.$route.params.space].name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better write it:
const oldSpaceName = this.$route.params.space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will test it !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I took it into account
src/SpaceDetails.vue
Outdated
const data = resp.data | ||
|
||
if (data.statuscode === 204) { | ||
this.$root.$data.spaces[data.space] = this.$root.$data.spaces[oldSpaceName] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be:
let space = this.$root.$data.spaces[oldSpaceName]
space.name = data.space
Vue.set(this.$root.$data.spaces, data.space, space)
delete this.$root.$data.spaces[oldSpaceName]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aaah okay ! Instead of replacing the space you advise me to create a new space in spaces list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took it into account !
src/SpaceDetails.vue
Outdated
} | ||
}) | ||
.catch((e) => { | ||
Vue.set(this.$root.$data.spaces[this.$route.params.space], 'name', oldSpaceName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I understand what you mean !
And I will correct it
…a/workspace into feature/rename-workspace/47
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please review my remarks.
There are also issues in the SpaceDetails.vue file.
appinfo/routes.php
Outdated
@@ -29,6 +29,11 @@ | |||
'url' => '/spaces', | |||
'verb' => 'GET' | |||
], | |||
[ | |||
'name' => 'workspace#create', | |||
'url' => '/spaces', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change the url to /api/spaces
?
I think it's better to do it like this.
I'll change the existing routes one of these days
@@ -49,6 +54,11 @@ | |||
'url' => '/group/{gid}/users', | |||
'verb' => 'GET' | |||
], | |||
[ | |||
'name' => 'workspace#rename', | |||
'url' => '/spaces/{folderId}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change the url to /api/spaces/{$folderId}
?
I think it's better to do it like this.
I'll change the existing routes one of these days
appinfo/routes.php
Outdated
@@ -59,5 +69,10 @@ | |||
'requirements' => array('path' => '.+'), | |||
'defaults' => array('path' => 'dummy'), | |||
], | |||
[ | |||
'name' => 'workspace#rename', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This route is already defined above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch... I am correcting it !
@@ -67,12 +79,12 @@ public function __construct( | |||
* may use. | |||
* | |||
* @NoAdminRequired | |||
* | |||
* @NoCSRFRequired |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@NoCSRTRequired isn't needed?!?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch... I had to add it to test when I didn't success to get all users :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the route with curl
@StCyr for Routes : If we want to add What do you think ? For example to support my proposition : When I create a space I return this json : {
"space": "Galadriel",
"id_space": 213,
"groups": {
"GE-Galadriel": 31,
"U-Galadriel": 31
},
"space_advanced_permissions": true,
"space_assign_groups": [
"GE-Galadriel",
"U-Galadriel"
],
"acl": {
"state": true,
"group_manage": "GE-Galadriel"
},
"statuscode": 201
} I don't know if this structure is better. But, to know if the resource is created, we can filter as it : |
@StCyr I resolved conflicts but I need your help ! 😕 Can you check again this PR, please ? 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
I've reviewed your PR.
I've a remark related to access-control on your 'rename' method + have found some regression removing the '/index.php' part in your axios calls
lib/Service/GroupfolderService.php
Outdated
*/ | ||
public function get($folderId) { | ||
$response = $this->httpClient->get( | ||
$this->urlGenerator->getBaseUrl() . '/apps/groupfolders/folders/' . $folderId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add /index.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's okay
lib/Service/GroupfolderService.php
Outdated
$this->urlGenerator->getBaseUrl() . '/index.php/apps/groupfolders/folders/' . $id . '/groups/' . $gid , | ||
public function delete($id) { | ||
$response = $this->httpClient->delete( | ||
$this->urlGenerator->getBaseUrl() . '/apps/groupfolders/folders/' . $id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add /index.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's okay 👌
lib/Service/GroupfolderService.php
Outdated
$this->urlGenerator->getBaseUrl() . '/index.php/apps/groupfolders/folders/' . $id, | ||
public function rename($folderId, $newSpaceName) { | ||
$response = $this->httpClient->post( | ||
$this->urlGenerator->getBaseUrl() . '/apps/groupfolders/folders/'. $folderId .'/mountpoint', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add /index.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's okay 👌
lib/Service/GroupfolderService.php
Outdated
*/ | ||
public function attachGroup($folderId, $gid) { | ||
$response = $this->httpClient->post( | ||
$this->urlGenerator->getBaseUrl() . '/apps/groupfolders/folders/' . $folderId . '/groups', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add /index.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's okay 👌
It's okay @StCyr now ;) |
Hey @StCyr 👋
The renaming is (almost) finished but the sidebar menu (AppNavigation) doesn't update at the same time.
Give you some advice me ? ^^'