@@ -301,32 +301,6 @@ func (o *userResourceType) CreateAccount(
301301 }, nil , outputAnnotations , nil
302302}
303303
304- func (o * userResourceType ) Delete (ctx context.Context , resourceId * v2.ResourceId ) (annotations.Annotations , error ) {
305- if o .enterpriseClient == nil {
306- return nil , fmt .Errorf ("baton-slack: enterprise client required for user deletion" )
307- }
308-
309- userID := resourceId .Resource
310- outputAnnotations := annotations .New ()
311-
312- user , ratelimitData , err := o .enterpriseClient .GetUserInfo (ctx , userID )
313- outputAnnotations .WithRateLimiting (ratelimitData )
314- if err != nil {
315- return outputAnnotations , fmt .Errorf ("baton-slack: failed to get user info: %w" , err )
316- }
317-
318- ratelimitData , err = o .enterpriseClient .RemoveUser (ctx , user .Profile .Team , userID )
319- outputAnnotations .WithRateLimiting (ratelimitData )
320- if err != nil {
321- if err .Error () == enterprise .SlackErrUserAlreadyDeleted {
322- return outputAnnotations , nil
323- }
324- return outputAnnotations , fmt .Errorf ("baton-slack: failed to delete user %s: %w" , userID , err )
325- }
326-
327- return outputAnnotations , nil
328- }
329-
330304func (o * userResourceType ) CreateAccountCapabilityDetails (ctx context.Context ) (* v2.CredentialDetailsAccountProvisioning , annotations.Annotations , error ) {
331305 return & v2.CredentialDetailsAccountProvisioning {
332306 SupportedCredentialOptions : []v2.CapabilityDetailCredentialOption {
0 commit comments