Open PVince81 opened 6 years ago
With this current state, all clients (desktop, mobile, etc) would need to reimplement the same logic. The more complex the logic becomes, the more logic needs to be replicated on clients.
Guest User creation was designed, to enter only the mail. No other Ui needed. It should be fully transparent for the clients. Display … (guest)
after the mail? Maybe server can put it in the shareWithAdditionalInfo
field? (owncloud/client#6749, owncloud/android#2284, owncloud/ios-app#83)
displaying "(guest)" can be done as part of the label like we do for federated shares
Just checked federated shares in the web UI, and label isn't used there. More JS magic?
{
"ocs": {
"meta": {
"status": "ok",
"statuscode": 100,
"message": "OK",
"totalitems": "",
"itemsperpage": ""
},
"data": {
"exact": {
"users": [],
"groups": [],
"remotes": [
{
"label": "user@exampl",
"value": {
"shareType": 6,
"shareWith": "user@exampl"
}
}
]
},
"users": [],
"groups": [],
"remotes": []
}
}
}
(ocs/v1.php/apps/files_sharing/api/v1/sharees?format=json&search=user%40exampl&perPage=200&itemType=folder
)
Why do clients need to care about the shareType
and need to adapt the UI? Only link share and user share (could be user, group, federated, guest …) should be differentiated.
This is all legacy stuff... I agree with you. We could introduce another label "fullDisplayName" that contains everything to be displayed, not only the user's display name.
A lot of the guest app code is in JS form: the autocomplete dropdown extension that decides whether to add "Add guest" in the dropdown depending on some criteria:
With this current state, all clients (desktop, mobile, etc) would need to reimplement the same logic. The more complex the logic becomes, the more logic needs to be replicated on clients.
At some point we need to think of moving said logic to the server side. This comes with its own complications as there is currently no good way to plug it in into the autocomplete results without affecting other apps (ex: custom groups also uses share autocomplete, to be confirmed).
There is a way to provide share providers (like federated shares one), maybe the guest app could implement one. The difference is that it would only display an entry and upon share creation, instead of creating a share it would create a guest instead of creating a share of type "guest".
@pmaier1 FYI