-
Notifications
You must be signed in to change notification settings - Fork 3
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
Siddev3 #427
base: main
Are you sure you want to change the base?
Siddev3 #427
Conversation
const dbAcl = acls?.[0]; | ||
if (!dbAcl) return res.status(404).send(`No ACL with id [${id}].`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const dbAcl = acls?.[0]; | |
if (!dbAcl) return res.status(404).send(`No ACL with id [${id}].`); | |
if (!acls?.[0]) return res.status(404).send(`No ACL with id [${id}].`); |
const id = req.query.id as string; | ||
if (!id) return res.status(422).send(`Missing param id.`); | ||
const acls: any[] = await executeAndEndSet500OnError( | ||
`SELECT * FROM AccessControlList where id = ?`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't select *
, select id
is sufficient
if (!dbAcl) return res.status(404).send(`No ACL with id [${id}].`); | ||
|
||
const members: ACLMembership[] = await executeAndEndSet500OnError( | ||
'SELECT * FROM ACLMembership WHERE parentACLId = ?', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'SELECT * FROM ACLMembership WHERE parentACLId = ?', | |
'SELECT memberUserId FROM ACLMembership WHERE parentACLId = ? AND memberUserId IS NOT NULL', |
[directMembers], | ||
res | ||
); | ||
res |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to also return the members whose entry is not found the database. Return empty string from this API.
And on the frontend show Unknown (in italics)
No description provided.