impresso / impresso-user-admin

Basic Django admin to manage user-related data in Impresso's Master DB.
GNU Affero General Public License v3.0
1 stars 0 forks source link

Create user bitmaps #64

Open piconti opened 2 months ago

piconti commented 2 months ago

Prepare the code that creates user bitmaps and performs the AND operations in the impresso middle layer.

The four first bits (starting on the left, indices 0-3) are the ones relating to the user plans The user bitmap relating to user plans is cumulative, hence, any user that is a researcher (bit #3 = 1) has all preceeding bits also set to 1 : 1111 [archive bits...]. All users have at least the "guest" bit set to 1 (bit #1): 1000 [archive bits, all 0]

piconti commented 1 month ago

Here is the bitwise and function I implemented for the bitmaps.