Remove @requires_admin from get_file and put_file

The @requires_admin flag prevents non-admin users who have Read and Write access to a shared folder from performing any operations.
main
Julio Ureña 2022-11-01 07:29:56 -04:00 committed by GitHub
parent a36d3145e1
commit cc72c6c868
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 2 deletions

View File

@ -1067,7 +1067,6 @@ class smb(connection):
return entries
@requires_admin
def put_file(self):
self.logger.info('Copy {} to {}'.format(self.args.put_file[0], self.args.put_file[1]))
with open(self.args.put_file[0], 'rb') as file:
@ -1077,7 +1076,6 @@ class smb(connection):
except Exception as e:
self.logger.error('Error writing file to share {}: {}'.format(self.args.share, e))
@requires_admin
def get_file(self):
self.logger.info('Copy {} to {}'.format(self.args.get_file[0], self.args.get_file[1]))
with open(self.args.get_file[1], 'wb+') as file: