Giter Club home page Giter Club logo

Comments (14)

hanjoosten avatar hanjoosten commented on July 26, 2024

This implies a whole new way of handling roles. Any suggestions?

from rap.

stefjoosten avatar stefjoosten commented on July 26, 2024

No. But I realized that this is a necessary feature for RAP3.

from rap.

sjcjoosten avatar sjcjoosten commented on July 26, 2024

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.

Michiel-s avatar Michiel-s commented on July 26, 2024

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.

Michiel-s avatar Michiel-s commented on July 26, 2024

When we've merged the VIOLATIONs and INTERFACEs this issue will also be solved I guess.

from rap.

RieksJ avatar RieksJ commented on July 26, 2024

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.

stefjoosten avatar stefjoosten commented on July 26, 2024

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.

stefjoosten avatar stefjoosten commented on July 26, 2024

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.

RieksJ avatar RieksJ commented on July 26, 2024

@stefjoosten: Yes. Please provide a concrete example of what you want to do.

from rap.

stefjoosten avatar stefjoosten commented on July 26, 2024

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.

hanjoosten avatar hanjoosten commented on July 26, 2024

@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.

stefjoosten avatar stefjoosten commented on July 26, 2024

Check! There is you example, @rieks. Thanks for bringing that up, @hanjoosten.

from rap.

RieksJ avatar RieksJ commented on July 26, 2024

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.

sjcjoosten avatar sjcjoosten commented on July 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.