Skip to content
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

feat: add guest invitation #521

Merged
merged 8 commits into from
Aug 24, 2022
Merged

feat: add guest invitation #521

merged 8 commits into from
Aug 24, 2022

Conversation

DeepDiver1975
Copy link
Member

@DeepDiver1975 DeepDiver1975 commented Jun 21, 2022

Screenshot from 2022-06-21 10-27-12

@DeepDiver1975 DeepDiver1975 force-pushed the feat/invite-guests branch 5 times, most recently from c148b82 to b5cbf52 Compare June 23, 2022 14:51
@pmaier1
Copy link
Contributor

pmaier1 commented Jun 27, 2022

Please make the input validation consistent with the regular sharing dialog. E.g., "ab@cd" offers guest creation while you need to add ".xy" in the sharing dialog.

@pmaier1
Copy link
Contributor

pmaier1 commented Jun 27, 2022

Please make sure that the CSV import will also work with new guests (and with multiple users).

@DeepDiver1975
Copy link
Member Author

Please make the input validation consistent with the regular sharing dialog. E.g., "ab@cd" offers guest creation while you need to add ".xy" in the sharing dialog.

We could now start a discussion what is the technical correct implementation....

... anyway will adjust the new code base for the sake of consistency

@DeepDiver1975 DeepDiver1975 force-pushed the feat/invite-guests branch 4 times, most recently from 4d9c6ab to 809d8f0 Compare June 27, 2022 21:04
@pmaier1
Copy link
Contributor

pmaier1 commented Jun 28, 2022

We could now start a discussion what is the technical correct implementation....

We've had that one earlier and decided for usability against technical correctness :)

@pmaier1 pmaier1 requested a review from JammingBen July 7, 2022 08:07
Copy link
Contributor

@JammingBen JammingBen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just noticed that JP added a few comments in #522 that relate to this PR. I added them here.

var displayName = data.displayName || userId
var role = null
if (data.type === 'guest') {
displayName = userId
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment from JP:

we might need a comment here. The displayname should be already initialized above prioritizing the displayname over the userid. If guests will use the userid anyway I think this needs a comment to explain it's intentional, otherwise it might be a bug because one type of users will use the displayname while others the userid.

];
}, $results);

# guest integration
Copy link
Contributor

@JammingBen JammingBen Jul 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment from JP:

I'm a bit confused here and maybe we need a comment clarifying.
Aren't guests shown as part of the regular result? or is this additional result a placeholder so the user can click on it to add that new user as a guest?


namespace OCA\CustomGroups\Service;

use OCA\Guests\Controller\UsersController;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment from JP:

I'm not sure if this works without the guests app around...
I think it's better to use either an API call or even a symfony event in order to remove the dependency with the app.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Guests is part of the *-complete.tar bundle, so we are 'pretty sure (tm)' it is installed.
API call (with proper error handling) is of course the better solution.

Implement batch action for inviting users to groups
@sonarcloud
Copy link

sonarcloud bot commented Jul 18, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@jnweiger jnweiger added the javascript Pull requests that update Javascript code label Aug 18, 2022
@sonarcloud
Copy link

sonarcloud bot commented Aug 24, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 9 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@jnweiger jnweiger merged commit f6fd9fe into master Aug 24, 2022
@delete-merged-branch delete-merged-branch bot deleted the feat/invite-guests branch August 24, 2022 07:05
@jnweiger jnweiger restored the feat/invite-guests branch August 24, 2022 07:05
@jnweiger jnweiger mentioned this pull request Aug 24, 2022
@jnweiger
Copy link
Contributor

jnweiger commented Aug 24, 2022

Confirmed implemented in 0.7.0-rc.1

There is no problem when the guests app is disabled. The functionality is not available then.
image
Same when the guests app is entirly deleted from the apps folder.

use OCA\Guests\Controller\UsersController; does not really seem to be a hard requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants