1
0
mirror of https://github.com/rancher/steve.git synced 2025-07-07 20:08:59 +00:00
Commit Graph

5 Commits

Author SHA1 Message Date
Alejandro Ruiz
8ae74491e7
Fix race in accessstore test (#466) 2025-01-28 20:35:24 -05:00
Alejandro Ruiz
fd9a516ecb
refactor(accesscontrol): deterministic cache key hashing (#292)
* refactor(accesscontrol): make addAccess directly accept PolicyRules

* refactor(accesscontrol): add new types for encapsulating all needed data

* refactor(accesscontrol): make getRules return resource version

* refactor(accesscontrol): add new getRoleRefs to policyRuleIndex

* refactor(accesscontrol): make accessStore use the new types and method

* cleanup(accesscontrol): remove unused code

* cleanup(accesscontrol): adapt tests

* cleanup(accesscontrol): add some comments and remove unused function

* refactor(accesscontrol): rework indexer to make it more readable and testable

* Fix typo

* test: consistent use of t.Error

* test: refactor policyRulesMock to just use a map

* misc: rename toUserInfo function

* refactor: consistent sort by UID
2024-10-28 09:35:59 +01:00
Alejandro Ruiz
484ce1c9e9
refactor(accesscontrol): use interface for AccessStore cache (#290) 2024-10-09 10:21:29 +02:00
Alejandro Ruiz
5c1a56204d
Add tests for concurrent AccessControl store usage (#286)
* refactor(accesscontrol): use interface for AccessStore cache

* refactor(accesscontrol): early return when cache is disabled

* test(accesscontrol): add failing unit test

* test(accesscontrol): skip failing test
2024-10-08 11:18:44 -04:00
Alejandro Ruiz
32c30149a6
refactor(accesscontrol): add unit tests for CacheKey (#245)
This is a follow up to 435e220 with a small refactor to make the function easier to test, and adding unit tests for CacheKey.
2024-08-28 10:06:21 +02:00