alexanderzatko / rovas

Application for participating in the NEO economy
0 stars 0 forks source link

Implement special verification procedure for reports with content bypass token #91

Closed alexanderzatko closed 4 years ago

alexanderzatko commented 4 years ago

use case A crowdsourced site enables access to its content only for Chrons reward. Upon creation of content in this site, a work report is created in Rovas (via API, or manually by the content creator). Rovas then picks two verifiers, one or both of whom might not want to pay to read the content, even though they believe that doing so is necessary for them to verify adequacy of the labor time reported in the verified report. The Site therefore generates an access token, which - when presented as a GET param. in the URL - will allow the content to be read without Chron payment. Thus the verifiers can easily see the content they were asked to verify.

code changes

  1. add a field into the work report content type, to hold the token (content bypass token, or CBT),
  2. modify the rule that sends email verification invitations to include the CB token - if the particular work report lists as a source of proof web site,
  3. on the Rovas verification form include the CB token in the content URL to allow it to be verified also if the verifier wants to do so from Rovas (as opposed to do so directly on the site where the content resides).
alexanderzatko commented 4 years ago

completed

alexanderzatko commented 4 years ago

To complete this functionality, Rovas needs to implement a new API service that will associate a verification event (verification) with a concrete verification slot/report. A service will be created that will accept access token and uid params, find the report to be verified and checks that a verification slot exists for that report assigned to an user with the given uid.

alexanderzatko commented 4 years ago

service rules_proxy_check_verifier_by_access_tokens was created as well as a rule rules_check_verifier_by_access_tokens that the service uses. The rule is more generic - it returns also the verifier user object, report object and verification slot objects - as the rule will be used also when completing verifications.

alexanderzatko commented 4 years ago

Expanding the use case to allow not only read access to the locked content, but also its verification. To support this feature a new API rule and service has been created: rules_create_verification_with_acccess_token

alexanderzatko commented 4 years ago

completed