Skip to content
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

🏫 Organizations and Roles #961

Merged
merged 6 commits into from
Jul 23, 2023
Merged

🏫 Organizations and Roles #961

merged 6 commits into from
Jul 23, 2023

Conversation

awtkns
Copy link
Contributor

@awtkns awtkns commented Jul 4, 2023

  • Adds a superadmin (on the user column)
  • Adds org table
  • Adds table to associate users to orgs
  • Users can make themselves admins on local now

@vercel
Copy link

vercel bot commented Jul 4, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agent-gpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 23, 2023 5:03pm
docs ✅ Ready (Inspect) Visit Preview Jul 23, 2023 5:03pm

@ergomake
Copy link

ergomake bot commented Jul 4, 2023

Hi 👋

Here's a preview environment 🚀

https://next-reworkd-agentgpt-961.env.ergomake.link

Environment Summary 📑

Container Source URL
next Dockerfile https://next-reworkd-agentgpt-961.env.ergomake.link
docs Dockerfile https://docs-reworkd-agentgpt-961.env.ergomake.link
platform Dockerfile https://platform-reworkd-agentgpt-961.env.ergomake.link
db Dockerfile [not exposed - internal service]
weaviate semitechnologies/weaviate:1.19.6 https://weaviate-reworkd-agentgpt-961.env.ergomake.link

Questions? Comments? Suggestions? Join Discord.

Click here to disable Ergomake.

Comment on lines 96 to 98
user User @relation(fields: [user_id], references: [id], onDelete: NoAction)
role Role @relation(fields: [role_id], references: [id], onDelete: NoAction)
Organization Organization? @relation(fields: [organization_id], references: [id], onDelete: NoAction)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we cascade delete onDelete for user and organization?

id String @id @default(cuid())
name String @unique
description String?
UserRole UserRole[]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

user_roles?

@ergomake
Copy link

ergomake bot commented Jul 22, 2023

Hi 👋

Here's a preview environment 🚀

https://next-reworkd-agentgpt-961.env.ergomake.link

Environment Summary 📑

Container Source URL
next Dockerfile https://next-reworkd-agentgpt-961.env.ergomake.link
platform Dockerfile https://platform-reworkd-agentgpt-961.env.ergomake.link
db Dockerfile [not exposed - internal service]
weaviate semitechnologies/weaviate:1.19.6 https://weaviate-reworkd-agentgpt-961.env.ergomake.link

Here are your environment's logs.

For questions or comments, join Discord.

Click here to disable Ergomake.

Comment on lines 51 to 55
accounts Account[]
sessions Session[]
runs Run[]
Agent Agent[]
UserRole UserRole[]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a bit in-consistent with casing, and plurals

Should we call this userRoles?

id String @id @default(cuid())
name String @unique

created_by String
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a username? email?

Thoughts on making this point to a owner user?

@asim-shrestha
Copy link
Contributor

sqlite build failure

Comment on lines +20 to +21
export function useAuth(
{ protectedRoute, isAllowed }: UseAuthOptions = { protectedRoute: false, isAllowed: () => true }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We specify defaults but the fields are also nullable?

@awtkns
Copy link
Contributor Author

awtkns commented Jul 23, 2023

sqlite build failure

prisma/prisma#2219 good old primsa gotta love it

@awtkns awtkns merged commit 07d989e into main Jul 23, 2023
5 checks passed
@awtkns awtkns deleted the roles branch August 3, 2023 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants