Meeds-io / MIPs

The Meeds Improvement Proposal repository
0 stars 0 forks source link

Public programs/actions #100

Closed srenault-meeds closed 7 months ago

srenault-meeds commented 8 months ago

Rationale

We aim to help our leaders (platform admin) to showcase their programs and actions in the public site and to make it happen, we have to update the way programs with "public" / "open" audience are considered. Indeed, currently, even actions from a program for which the audience is an open space cannot be listed to logged in users. This reduce the onboarding and this requests to the administrator to check, to look for default spaces, etc.

So we need to make it more simple and easier to manage.

1. Functional Requirements

Top User Stories

"Public" term meaning

If platform is closed, then programs are not public to anyone, only registered users can see it from actions / programs page.

If platform is opened AND public site made visible:

Access to public programs and related actions

When it comes to try announcing an achievement for a program that is considered "open", then it proposes you to participate. Public site access case: If not logged in, then you are sent to the login page

Access from the platform as logged in user: If not yet member of the space, then you can participate AND you are considered member of that space

Impacts

Gamification

When a program's audience is an open space, then all user can see the actions. By participating to one of the action, then the user is considered member of the space If the action is automatic, propose to participate when not user yet so the user becomes member of the space.

Notifications

NA

Analytics

NA

Unified Search

Make the "public" action searchable from the unified search even if not member of the audience

2. Technical Requirements

Expected Volume & Performance

The algorithm of programs retrieving will change to retrieve the list of programs where the user is member + (new condition) the program has a Space with Open Registration. To not having to request spaces each time the list of programs are retrieved (lower the performance thus the UX), the Space Registration information has to be duplicated in Programs. this information has to be of type Enum to optimize the storage size (which will not considerably increase considering the number of programs that a platform can have).

Security

The endpoints programs, actions and leaderboard endpoints has to be publically accessible and make the access restriction made in Service layer.

Upgradability

The existing programs has to follow the new business rule where the program becomes publically accessible if the corresponding space audience is Open to registration.

Feature Flags

No need to feature flags.

3. Software Architecture

Security

The REST endpoints gamification/rules, gamification/programs and gamification/leaderboard/rank/all to to be publically accessible. The user information has to be retrieved in those endpoints to not having to expose publically the endpoint of identities (v1/social/users).

Access

The portlets programsOverview, challengesOverview and topChallengers has to be reworked to be publically accessible with the 3 endpoints mentioned above only without additional endpoints.

Services & processing

When updating or creating a program the Program Visibility has to be stored in the program, following Space registration. A space listener has to be implemented to update the visibility each time the space registration is updated.

Data and persistence

We will have to add in Database Table GAMIFICATION_DOMAIN the new field VISIBILITY of type INT in order to hold the Visibility type: either OPEN or RESTRICTED enum ordinal value. The default value of enum has to be RESTRICTED = 0.

Migration strategy

The existing programs has to be migrated to hold the value of Space Registration Type. To do this:

  1. The list of spaces will be retrieved from programs list
  2. Only OPEN Registration spaces will be filtered
  3. Update using one query all programs having as audience one of the OPEN Registration spaces or no audience at all
srenault-meeds commented 8 months ago

Open to review @margondicco

srenault-meeds commented 8 months ago

Hello @margondicco Can you please take a look at this one? Thanks

margondicco commented 8 months ago

Hello Go fonc :-)

boubaker commented 8 months ago

Ready for Tech review by DAO members (eXo: @rdenarie )

rdenarie commented 8 months ago

Go tech

boubaker commented 7 months ago

The PRs list (incomplete in MIP Links, due to limitation in github ):

boubaker commented 7 months ago

ACCs and PRs ready for review by DAO members (eXo : @rdenarie )

PRs are listed in the comment https://github.com/Meeds-io/MIPs/issues/100#issuecomment-1795371964

(Due to limitation to 10 PRs when linking)

boubaker commented 7 months ago

ACCs and PRs ready for review by DAO members (eXo : @rdenarie )

PRs are listed in the comment #100 (comment)

(Due to limitation to 10 PRs when linking)

Meeds QA PR added as well.

boubaker commented 7 months ago

Added additional issue that is blocked waiting for MIP merge (Meeds-io/meeds#1250)

rdenarie commented 7 months ago

All pr approved

boubaker commented 7 months ago

All pr approved

Thanks all PRs merged to develop. I let you define the custom value of properties in eXo side for engagement and myCraft sites until the corresponding MIP is merged into meeds as well.