-
-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Organization system #258
Comments
Current status:
|
To do back:
To do front:
|
|
@YacineMessaadi thanks for the work.
|
@riderx Thanks for the review, I work on it |
I have worked on the desktop version, you can check it. |
DONE: the current style of tabs don’t match the one in figma, i would prefer we follow the same as we have already. |
Still missing:
|
Done:
By this function : CREATE OR REPLACE FUNCTION check_min_rights(min_right user_min_right, user_id uuid, org_id uuid, app_id varchar, channel_id bigint)
RETURNS boolean AS $$
DECLARE
user_right_record RECORD;
BEGIN
FOR user_right_record IN
SELECT org_users.user_right, org_users.app_id, org_users.channel_id
FROM org_users
WHERE org_users.org_id = check_min_rights.org_id AND org_users.user_id = check_min_rights.user_id
LOOP
IF (user_right_record.user_right >= min_right AND user_right_record.app_id IS NULL AND user_right_record.channel_id IS NULL) OR
(user_right_record.user_right >= min_right AND user_right_record.app_id = check_min_rights.app_id AND user_right_record.channel_id IS NULL) OR
(user_right_record.user_right >= min_right AND user_right_record.app_id = check_min_rights.app_id AND user_right_record.channel_id = check_min_rights.channel_id)
THEN
RETURN true;
END IF;
END LOOP;
RETURN false;
END;
$$ LANGUAGE plpgsql; |
@YacineMessaadi I think we also need views in Figma from different rights.
What user with this rights see is important. |
|
@riderx |
/bounty $500 |
|
/attempt #258 Options |
@riderx
|
To start the project have a look at |
The figma lack of some view as I shared, you are free to design them or propose a design template from any open source tailwind component |
Ok, now I have a clearer picture. I will start working tomorrow and let you know if I have any questions. |
@pbkompasz any updates ? |
@riderx I saw the commits. I started with the frontend and made some progress but I didn't have much free time this week. I will try to finish it by Saturday. |
@riderx The billings menu should redirect to a Stripe dashboard like in the user settings? |
@riderx Can you give some more information on the organization rights. And also the security rules e.g. a member with a right what actions can perform. |
I let you do a proposal of what they can access |
Hey. I cannot work on this PR anymore. I finished part of the frontend, written the backend functions but I didn't have time to finish it. I created a draft PR, maybe someone else can take over. |
/attempt #258 @pbkompasz I'll take it over from here Options |
Note: The user @pbkompasz is already attempting to complete issue #258 and claim the bounty. If you attempt to complete the same issue, there is a chance that @pbkompasz will complete the issue first, and be awarded the bounty. We recommend discussing with @pbkompasz and potentially collaborating on the same solution versus creating an alternate solution. |
Since neo cancelled his attempt 12 hours ago, I will be taking this. Do we want to replace all If so, how do we go about migration? Do I just write some SQL to migrate from old user_id into org_id and when we merge this system we turn off prod -> migrate -> restart prod? |
/attempt #258 Options |
I redesigned the members panel as I did not liked how it looked. Do you like how this looks or no? |
Im good with it |
Wrote a dialog to insert email of the user that we want to invite. Please give feedback on this @riderx |
I will probably replace the |
Here is a demo for the invitation system (Only for organizations for now) 2023-08-31.08-20-06.mp4 |
As for API keys: I will keep them per user and not per org. It is really pointless to have shared api keys per org and having api keys per org add unnecessary complexity |
@WcaleNieWolny for the Dialog did you made the same as we have now for channel invite, if user don't exist it invite him, and ask for name as well |
I though it looked more "clean" that way, the first modal is strictly for email and the other one if for permissions with a nice explanation. Sure, I could pack that into one but then we would not have a nice explanation for each of the button. Used 2 modals to make the UX better |
If I understand this correctly, then no I still have not implemented channel invites. I am doing only org for now and later I will add both app and channel invitations
You want to ask the user about some sort of nickname for the invited user? Like if I invite |
I mean this invite system is not linked to channel, it's more about if the user doesn't exist in Capgo we have a way to create him and send a magic link with Supabase. |
Wrote some code to accept invitations, please let me know if you like it @riderx 2023-09-01.14-01-06.mp4 |
I do not like this idea. I strongly believe that billing should stay as is and if you are invited to any valid (billed) org then you can use capgo. Transferring billing to org adds extra complexity that could be avoided. Any org admin will not be paying for the org with his own money. That is the job of the owner |
@neo773: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏 |
@zcesur |
This comment was marked as off-topic.
This comment was marked as off-topic.
@WcaleNieWolny: Reminder that in 7 days the bounty will become up for grabs, so please submit a pull request before then 🙏 |
💡 @WcaleNieWolny submitted a pull request that claims the bounty. You can visit your bounty board to reward. |
🎉🎈 @WcaleNieWolny has been awarded $500! 🎈🎊 |
Instead of link app to user, we want to create org for user and link app to org.
That will allow us to give org right to more than one user.
The text was updated successfully, but these errors were encountered: