Comments (14)
This implies a whole new way of handling roles. Any suggestions?
from rap.
No. But I realized that this is a necessary feature for RAP3.
from rap.
For RAP3, maybe we can change the corresponding rules to use _SESSION
, such that there is only a violation if the person corresponding to the current session is responsible.
Note that this means that _SESSION should be allowed to occur in rules too (it currently is allowed in the type-checker, but I was going to disallow that).
In general, this problem becomes a bit easier to think about when yellow violations are seen as special cases of interfaces, rather than special cases of rules.
from rap.
In general, this problem becomes a bit easier to think about when yellow violations are seen as special cases of interfaces, rather than special cases of rules
I fully agree with @sjcjoosten. @RieksJ and I already experienced in our prototyping cases that that "yellow" rule expressions can be used to create todo lists in interfaces. There it is easy to add the session atom to your expression to have the required output.
A common pattern, replace:
RULE xyz : r |- s
ROLE todo MAINTAINS xyz
with
INTERFACE xyz FOR todo : r-s
from rap.
When we've merged the VIOLATIONs and INTERFACEs this issue will also be solved I guess.
from rap.
Per definition, yellow violations are shown to the ROLE(s) that must work with them. If you have other violations showing up, then you may have defined the wrong rule. One way of solving this that does not require waiting for the solution of @sjcjoosten and @Michiel-s would be to add a property-term (i.e. a construct (I /\ expression)
somewhere in the left side expression of the rule that indicates the user's relation to the violation you have. If @stefjoosten provides an example of a rule, then I'll show how to fix it.
from rap.
You guys are making me Think Hard... 😥 I don't understand Sebastiaan's remark. What does it mean that a violation is an interface? Michiel already understands, but I need some help. (Thumbs up, Michiel 😁)
from rap.
Rieks' s solution sounds like what Han came up with in a telephone conversation. I assume this solution is Ampersand-only. That is: it does not require PHP or Haskell programming. Is that correct, Rieks?
from rap.
@stefjoosten: Yes. Please provide a concrete example of what you want to do.
from rap.
I'll do that after oct 22nd, when I return from Holiday. Until then I only have my phone and most of the time no internet.
from rap.
@rieks: In RAP3 you introduced a rule that password of an account shouln't be 'welcome' if there is a script attatched to that account. Your intention probably was that only the user who is logged in with such an account would be signalled with a single violation. However, currently any user with the rule 'student' will get all violations, regardless of the account.
from rap.
Check! There is you example, @rieks. Thanks for bringing that up, @hanjoosten.
from rap.
I just checked that rule. It reads as follows:
ROLE User MAINTAINS "Wilt u uw wachtwoord veranderen?"
RULE "Wilt u uw wachtwoord veranderen?": '_SESSION';sessionAccount;accPassword;'welkom' |- -V
MESSAGE "Het wachtwoord 'welkom' dient te worden aangepast."
VIOLATION (TXT "U dient uw wachtwoord te wijzigen in de interface 'My Account' in de menubalk.")
There is nothing that should be changed there, since every violation (when computed) can at most contain one pair, being ('_SESSION','welkom'), and this violation pertains to that user's account. This should work.
@stefjoosten: please provide a proper example for this ticket.
from rap.
I'm marking this as ampersand coding required based on Rieks' solution for this rule. If he wants nice Ampersand syntax for rules like this (and I agree that would be a nice feature) @stefjoosten can ask for that in a separate ticket, but it will be less urgent since RAP3 does not depend on that.
from rap.
Related Issues (20)
- Docker compose errors HOT 1
- Invalid exec engine function call HOT 2
- Find out why the database runs out of resources
- Set ImagePullPolicy to Always in the student prototype template yaml HOT 1
- Fix student prototype that is there for the image caching
- Bug mysql database after creation prototype HOT 5
- Refactor and clean up ExecEngineFunctions code
- Build errors on new version of generated Angular code HOT 2
- Certain webservices not available on RAP HOT 1
- Geen prototype op basis van het tutorial HOT 7
- ATLAS (or RAP) is missing data from the provided .adl script HOT 1
- Fixing bug Concept definition not passed to ATLAS
- Refactor shell script in RAP for student prototype image
- adding default prefix to username
- Install the Ampersand daemon
- Classify statement not working in RAP
- Beveiligings issues HOT 2
- Link to generated prototype gives a page with `Bad Gateway` HOT 2
- Bug: Bad gateway in student prototype container
- Set up Prometheus monitoring for Kubernetes
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rap.