[Circles] admin should be able to edit some more settings
Is your feature request related to a problem? Please describe.
With the last version of Circles, we are adding some customization to circles. This allow admins of a Circle to:
- enforce password protection on link generated when sharing files to external members.
- allow the creation of an optional single password to protect those shares. (If not, a random password will be generated)
Describe the solution you'd like
Those settings needs to be configurable by an admin and can be displayed in the same page than the current page when an admin can set the visibility of your circle. If on the same page, it needs to be fully separated from the current 'config' part of the Circle.
Describe alternatives you've considered
Requesting help from @nextcloud/designers :)
Additional context
Settings should already be available as an array in the model Circle, and returned by the back-end when a request includes a Circle. Example of curl request to update a setting:
$ curl -X PUT "http://nc23.local/ocs/v2.php/apps/circles/circles/GrjA5QR2J8trwyYEBUjy1tOdyGVZUuj/setting?format=json" -H "OCS-APIRequest: true" -u "user:password" -d setting=test -d value=123
{
"ocs": {
"meta": {
"status": "ok",
"statuscode": 200,
"message": "OK"
},
"data": {
"id": "GrjA5QR2J8trwyYEBUjy1tOdyGVZUuj",
"name": "t001",
"displayName": "t001",
"sanitizedName": "t001",
"source": 16,
"population": 0,
"config": 0,
"description": "",
"settings": {
"ouila": "123",
"test": "123"
},
[...]
If value is not provided, setting will be removed.
current PR on back-end: https://github.com/nextcloud/circles/pull/926
@ChristophWurst
yes?
Describe alternatives you've considered
Requesting help from @nextcloud/designers :)
Friendly ping @jancborchardt @nimishavijay. Please let us know how this should work from a user's perspective.
@ArtificialOwl I'm not entirely sure I understand. Do you have a screenshot of how it looked like in the previous version of Circles (the one not in Contacts yet)?
Hello,
Let me show you 2 screenshots:
The old circle's setting page <NC22

The new one >= NC22

The new settings page of a Circle is missing some entries:
enable password protectionon all files shared to the Circleenable single password protectionso that only one password will be generated for all files shared to the Circle.set single passwordto define the single password to be used when sharing a file to the Circle.
Note that enable single password protection and set single password are linked: if enable is true but no single password is set, a random password will be generated for each new shares.
In my opinion those new entries in the setting page needs to be added just before the 'Delete Circle' button, slightly separated from the current available options.
We can arrange a call to discuss about some missing details !
If I understand correctly we need to add three additional checkboxes that add attributes to the backend request when toggled, right?
Sorry, I was sure I wrote it down somewhere, cannot find it...
We need to add a field and few checkbox, I do not know the exact design but the idea is to have
- [checkbox] Enforce Password protection on Files shared to this circle
- [checkbox] Use a unique password for all shares to this circles
- [field] Set said unique password.
Also, this is not related to the other list of checkbox, this is why a small separation from the already existing configuration panel might be nice.
The request about this new settings will be done on /circles/{circleId}/setting (instead of /circles/{circleId}/config)
A curl request as example:
curl -X PUT "http://nc24.local/ocs/v2.php/apps/circles/circles/CbakseFf9bdI93pEfd9YKznmprjWIfD/setting?format=json" -u 'user:pass' -H "OCS-APIRequest: true" -d '{"setting": "toto", "value": "oui"}' -H "Content-Type: application/json"
{
"ocs": {
"meta": {
"status": "ok",
"statuscode": 200,
"message": "OK"
},
"data": {
"id": "CbakseFf9bdI93pEfd9YKznmprjWIfD",
[details about the circle]
"settings": {
"population": 1,
"populationInherited": 1,
"toto": "oui"
}
}
}
}
value must be string or null, if value is null then the setting is removed.
You can add any settings to the Circles, but let's focus on the one we use:
'enforce_password'need to be set to"1"or"true"(string !) to enable the password enforcement'password_single'is the clear version of the password. Please note that the password is encrypted by the back-end before save.'password_single_enabled'need to be set to"1"or"true"(string) to enable the use of thepassword_singleinstead of using a randomly generated password.
This is the request to change password:
curl -X PUT "http://nc24.local/ocs/v2.php/apps/circles/circles/CbakseFf9bdI93pEfd9YKznmprjWIfD/setting?format=json" -u 'user:pass' -H "OCS-APIRequest: true" -d '{"setting": "password_single", "value": "1234"}' -H "Content-Type: application/json" | jq
{
"ocs": {
"meta": {
"status": "ok",
"statuscode": 200,
"message": "OK"
},
"data": {
"id": "CbakseFf9bdI93pEfd9YKznmprjWIfD",
[...]
"settings": {
"population": 1,
"populationInherited": 1,
"enforce_password": "1",
"password_single_enabled": "1",
"password_single": "3|$argon2id$v=19$m=65536,t=4,p=1$Tmw5YlFsM1l1YUVQaDJLRA$LwaAIhv4ZXXMFPw4vkrLcwqs+mTjHwCj6f55D7b+uhc"
}
}
}
}
Reopening as it seem to still occur.
@artonge not sure what you meant with "seems to still occur". The issue at hand seems to be fixed with #2766, no?
@mejo-, it's been more than a year since that comment, I don't remember the background, sorry. Feel free to ignore it.