mirror of
https://github.com/pawelmalak/flame.git
synced 2025-04-25 06:17:12 -04:00
Added auth middleware. Added access control to apps
This commit is contained in:
parent
d1c61bb393
commit
e3f167921c
16 changed files with 92 additions and 9 deletions
|
@ -25,13 +25,18 @@ const getAllApps = asyncWrapper(async (req, res, next) => {
|
|||
await useKubernetes(apps);
|
||||
}
|
||||
|
||||
// apps visibility
|
||||
const where = req.isAuthenticated ? {} : { isPublic: true };
|
||||
|
||||
if (orderType == 'name') {
|
||||
apps = await App.findAll({
|
||||
order: [[Sequelize.fn('lower', Sequelize.col('name')), 'ASC']],
|
||||
where,
|
||||
});
|
||||
} else {
|
||||
apps = await App.findAll({
|
||||
order: [[orderType, 'ASC']],
|
||||
where,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue