Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asset selection in rules #61

Merged
merged 14 commits into from Aug 14, 2019
Merged

Asset selection in rules #61

merged 14 commits into from Aug 14, 2019

Conversation

immqu
Copy link
Contributor

@immqu immqu commented Aug 13, 2019

  • Extended CCL to allow applying rules only to specific assets using the "with" statement, e.g. user with name="admin" has [condition]
  • Changed CCL rules to eliminate some recursive statements
  • Extended and fixed TimeComparison with different operators for referring to a property's age and a property's expiry in the future:
  1. Use the before and after operators to define rules concerning dates in the future, e.g. user has expiry before 100 days in all accessKeys (meaning the expiry date is before today's date plus 100 days)
  2. Use the younger and older operators to define rules concerning the age of assets, e.g. user has createDate younger 100 days in all accessKeys (meaning the creation date is after today's date minus 100 days)
  • Changed respective tests

// take the first one
return this.conditions.get(0).getAssetType();
return this.conditions.get(0).getAssetType().getField();
Copy link
Member

Choose a reason for hiding this comment

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

This creates a problem since only the first condition will be evaluated regarding its applicability but in future we are reworking this anyway in #62

@oxisto oxisto merged commit deb5477 into master Aug 14, 2019
@oxisto oxisto deleted the asset-selection-in-rules branch August 14, 2019 15:48
@oxisto
Copy link
Member

oxisto commented Aug 16, 2019

Fixes #45

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants