Skip to content

[#505] create an atomic ACLs endpoint#808

Merged
alanking merged 3 commits intoirods:mainfrom
d-w-moore:505.m
Apr 8, 2026
Merged

[#505] create an atomic ACLs endpoint#808
alanking merged 3 commits intoirods:mainfrom
d-w-moore:505.m

Conversation

@d-w-moore
Copy link
Copy Markdown
Collaborator

No test yet, will undraft when I have one.
Exercised now with this script:

# run as rods after 
# $ irm -fr b; itouch b
# $ iadmin mkzone twilight remote
# $ iadmin mkuser dan rodsuser
# $ iadmin mkuser charlie#twilight rodsuser

import irods
from irods.access import iRODSAccess
from irods.exception import iRODSException

s = irods.helpers.make_session()

try:
  pass
  s.acls._call_atomic_acl_api(
   "/tempZone/home/rods/b",
   iRODSAccess("write","","dan"),
   iRODSAccess("write","","public"),
   iRODSAccess("read","","charlie","twilight"),
 )
except iRODSException as exc:
  print(f'{exc!r}')
  e = exc
  print (e.server_msg.get_json_encoded_struct())
#except Exception as exc:
#  print(repr(exc))
else:
  print ('---> success')
  pass

@d-w-moore d-w-moore marked this pull request as draft March 20, 2026 23:28
@d-w-moore d-w-moore self-assigned this Mar 21, 2026
@d-w-moore d-w-moore marked this pull request as ready for review March 21, 2026 04:45
@d-w-moore
Copy link
Copy Markdown
Collaborator Author

How would the team feel about my deprecating _iRODSAccess_pre_4_3_0, since we're now officially not supporting iRODS < 4.3.0 in PRC?

@korydraughn
Copy link
Copy Markdown
Contributor

The leading underscore indicates that symbol is private to the implementation. If that's the case, no objections here.

@korydraughn
Copy link
Copy Markdown
Contributor

Then again, if it's an implementation detail, then we don't have to deprecate it. We can just remove it.

@d-w-moore
Copy link
Copy Markdown
Collaborator Author

d-w-moore commented Mar 23, 2026

Ready for review. ACLOperation now created as part of an improved interface for atomic ACLs call.

@korydraughn
Copy link
Copy Markdown
Contributor

Spotted this in the type checking workflow.

irods/manager/access_manager.py:54: error: Incompatible types in assignment (expression has type "list[Any]", target has type "str")  [assignment]

Copy link
Copy Markdown
Contributor

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

Looking good so far.

@d-w-moore
Copy link
Copy Markdown
Collaborator Author

d-w-moore commented Mar 26, 2026

Sorry for the forced push... just put some ruff changes through and added a structure that maps all permission keys to their respective codes - including all synonyms. It will help someone that say wants to do this:

sorted( [*ses.acls.get(object) , *my_ACLOperation_list ], 
               key= lambda acl:irods.access.all_permissions[acl.access_name] )

which would sort the whole list of retrieved permissions and new applicable ACLOperations together, ordering by increasing numeric permission code.

Yes, I know - very niche. But it affords the customer some pretty good flexibility.

@d-w-moore
Copy link
Copy Markdown
Collaborator Author

linters and tests are queued up.

Code is ready for final review, I think.

Copy link
Copy Markdown
Contributor

@alanking alanking left a comment

Choose a reason for hiding this comment

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

Looks like we're rounding the corner. Still see a couple unresolved comments

@d-w-moore
Copy link
Copy Markdown
Collaborator Author

I think it's ready for final eyes.... Squashing.

Copy link
Copy Markdown
Contributor

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

We're in the final stretch.

@d-w-moore d-w-moore force-pushed the 505.m branch 4 times, most recently from 12109f9 to fe51e78 Compare March 30, 2026 00:47
@d-w-moore
Copy link
Copy Markdown
Collaborator Author

Now ready for "final" final review. Will put off addressing remaining lint reports since it seems the NOQA mechanism is not adequate for suppression of individual ruff complaints.

@d-w-moore d-w-moore force-pushed the 505.m branch 4 times, most recently from f9b27ae to b365440 Compare April 5, 2026 16:40
@d-w-moore d-w-moore force-pushed the 505.m branch 2 times, most recently from 428f797 to d0a730a Compare April 7, 2026 17:39
@d-w-moore
Copy link
Copy Markdown
Collaborator Author

We should be good now for final review

Copy link
Copy Markdown
Contributor

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

Looks good to me.

Copy link
Copy Markdown
Contributor

@alanking alanking left a comment

Choose a reason for hiding this comment

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

Nothing major from me. Awaiting resolution of final remaining comments

Copy link
Copy Markdown
Contributor

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

Squash to taste!

@d-w-moore d-w-moore force-pushed the 505.m branch 2 times, most recently from 46ecbb0 to 8c3d918 Compare April 7, 2026 21:54
@d-w-moore
Copy link
Copy Markdown
Collaborator Author

Squashed.

Copy link
Copy Markdown
Contributor

@korydraughn korydraughn left a comment

Choose a reason for hiding this comment

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

Please wait for a second approval before adding the pounds.

Copy link
Copy Markdown
Contributor

@alanking alanking left a comment

Choose a reason for hiding this comment

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

# it

@d-w-moore
Copy link
Copy Markdown
Collaborator Author

#'d

@alanking alanking merged commit 1b32105 into irods:main Apr 8, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants