mirror of
https://github.com/wekan/wekan.git
synced 2025-04-24 05:57:13 -04:00
Added a non restrictive authentication function
This commit is contained in:
parent
adc6a45185
commit
609a8894ec
1 changed files with 10 additions and 0 deletions
|
@ -17,5 +17,15 @@ Meteor.startup(() => {
|
|||
|
||||
};
|
||||
|
||||
// This will only check if the user is logged in.
|
||||
// The authorization checks for the user will have to be done inside each API endpoint
|
||||
Authentication.checkLoggedIn = function(userId) {
|
||||
if(userId === undefined) {
|
||||
const error = new Meteor.Error('Unauthorized', 'Unauthorized');
|
||||
error.statusCode = 401;
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue