-
Notifications
You must be signed in to change notification settings - Fork 67
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
Unable to disable notification emails when adding drive permissions #103
Comments
Hey, I had similar behaviours with the Cheers |
Hey @aitcriver - The default for the standard API is It may be worth adding an additional parameter that's more explicit like For now, you can disable email notification as @n-searle mentioned by including |
Ah, yes, that is helpful, I wasn't exactly sure how to force that parameter to false. Right now, the behavior is that the -SendNotificationEmail parameter does nothing; it is true if the parameter is added of course, but it is also true when it is not added. The only way this parameter does anything is the not-obvious workaround posted here. A DisableNotificationEmail parameter could work, but I think it would be better to just default to no notification for all cases and then require the -SendNotificationEmail if notifications are desired. Or, change it from a switch parameter to one that accepts a $true/$false value. I typically use GAM so that's my frame of reference; GAM defaults to no notification emails unless you specify to send one. |
Alright, GitHub is currently going through a data outage, but I have this in a PR ready. Specifically, I updated Should hopefully have this out by tomorrow! |
Sounds perfect! That was awfully quick, thank you! |
…103 ## 2.17.0 * [Issue #102](#102) * Fixed: `$EncryptionKey` PSM1 parameter now stores the AES key correctly so SecureStrings are encrypted/decrypted as intended. * [Issue #103](#103) * Updated: `SendNotificationEmail` parameter on `Add-GSDrivePermission` defaults to false for all User & Group permissions that are not ownership transfers. * Updated: Documentation for `SendNotificationEmail` parameter on `Add-GSDrivePermission` for clarity towards default Google API parameter values. * Added: More unit testing for `Get-GSUser` * Updated: `psake` build script
hey @aitcriver - v2.17.1 is out now with that update! let me know how it works for you =] |
Thanks! I've verified that it doesn't send the notification email by default now. However, I don't seem to be able to set it to send a notification email. I get an "Add-GSDrivePermission : The property 'SendNotificationEmail' cannot be found on this object. Verify that the property exists and can be set." error:
|
Snap!! I think I know what the issue is, I'm on it!
Thanks for testing!
On Wed, Oct 24, 2018 at 3:18 PM aitcriver ***@***.***> wrote:
Thanks! I've verified that it doesn't send the notification email by
default now. However, I don't seem to be able to set it to send a
notification email. I get an "Add-GSDrivePermission : The property
'SendNotificationEmail' cannot be found on this object. Verify that the
property exists and can be set." error:
Compare-ModuleVersion
ModuleName InstalledVersion GalleryVersion UpdateAvailable
---------- ---------------- -------------- ---------------
PSGSuite 2.17.1 2.17.1 False
Add-GSDrivePermission -User ***@***.*** -FileId DriveFileId -Role writer -Type user -EmailAddress ***@***.*** -SendNotificationEmail
Add-GSDrivePermission : The property 'SendNotificationEmail' cannot be found on this object. Verify that the property exists and can be set.
At line:1 char:1
+ Add-GSDrivePermission -User ***@***.*** -FileId DriveFile ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Add-GSDrivePermission
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#103 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AMIo3Z799ZQCfyN6cWsFE3UuNqD3Z8Gyks5uoMsegaJpZM4XytKV>
.
--
Thank you for your time, Nate Ferrell (SCRT HQ)
|
@aitcriver - alright, update to 2.17.2 when you can and let me know if you're solid now! |
I've updated, and it looks good now! I don't receive the notification when the -SendNotificationEmail parameter isn't included, and the notification is sent when it is included. Thanks! |
Awesome! Thanks for validating! Sent with GitHawk |
The -SendNotificationEmail parameter for the Add-GSDrivePermission permission is a switch parameter. However, this value defaults to true when adding permissions to users and groups, and adding the parameter does not switch this value to false. So, it doesn't seem to be possible to add permissions without sending a notification email.
Steps to reproduce the behavior:
Expected behavior
Notification email should not be sent for the added permission.
The text was updated successfully, but these errors were encountered: