@@ -326,10 +326,14 @@ def action_read
326
326
elog ( 'failed to parse a binary security descriptor to SDDL' , error : e )
327
327
else
328
328
print_status ( " nTSecurityDescriptor: #{ sddl_text } " )
329
- permissions = [ 'READ' ] # if we have the object, we can assume we have read permissions
330
- permissions << 'WRITE' if adds_obj_grants_permissions? ( @ldap , obj , SecurityDescriptorMatcher ::Allow . new ( :WP ) )
331
- permissions << 'ENROLL' if adds_obj_grants_permissions? ( @ldap , obj , SecurityDescriptorMatcher ::Allow . certificate_enrollment )
332
- permissions << 'AUTOENROLL' if adds_obj_grants_permissions? ( @ldap , obj , SecurityDescriptorMatcher ::Allow . certificate_autoenrollment )
329
+ if adds_obj_grants_permissions? ( @ldap , obj , SecurityDescriptorMatcher ::Allow . full_control )
330
+ permissions = [ 'FULL CONTROL' ]
331
+ else
332
+ permissions = [ 'READ' ] # if we have the object, we can assume we have read permissions
333
+ permissions << 'WRITE' if adds_obj_grants_permissions? ( @ldap , obj , SecurityDescriptorMatcher ::Allow . new ( :WP ) )
334
+ permissions << 'ENROLL' if adds_obj_grants_permissions? ( @ldap , obj , SecurityDescriptorMatcher ::Allow . certificate_enrollment )
335
+ permissions << 'AUTOENROLL' if adds_obj_grants_permissions? ( @ldap , obj , SecurityDescriptorMatcher ::Allow . certificate_autoenrollment )
336
+ end
333
337
whoami = adds_get_current_user ( @ldap )
334
338
print_status ( " * Permissions applied for #{ whoami [ :userPrincipalName ] . first } : #{ permissions . join ( ', ' ) } " )
335
339
end
0 commit comments