Skip to content

Commit

Permalink
Merge branch 'SIMSBIOHUB-424' of https://github.com/bcgov/biohubbc-pl…
Browse files Browse the repository at this point in the history
…atform into SIMSBIOHUB-424
  • Loading branch information
NickPhura committed Jan 16, 2024
2 parents 2f1ce3b + 54cf8f4 commit f8fbd1e
Show file tree
Hide file tree
Showing 27 changed files with 2,023 additions and 1,654 deletions.
1,562 changes: 934 additions & 628 deletions api/package-lock.json

Large diffs are not rendered by default.

131 changes: 0 additions & 131 deletions api/src/paths/administrative/security/apply.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { RequestHandler } from 'express';
import { Operation } from 'express-openapi';
import { SYSTEM_ROLE } from '../../../../constants/roles';
import { getDBConnection } from '../../../../database/db';
import { authorizeRequestHandler } from '../../../../request-handlers/security/authorization';
import { SecurityService } from '../../../../services/security-service';
import { getLogger } from '../../../../utils/logger';
import { SYSTEM_ROLE } from '../../../constants/roles';
import { getDBConnection } from '../../../database/db';
import { authorizeRequestHandler } from '../../../request-handlers/security/authorization';
import { SecurityService } from '../../../services/security-service';
import { getLogger } from '../../../utils/logger';

const defaultLog = getLogger('paths/administrative/security/category');
const defaultLog = getLogger('paths/administrative/security/categories');

export const GET: Operation = [
authorizeRequestHandler(() => {
Expand All @@ -23,7 +23,8 @@ export const GET: Operation = [
];

GET.apiDoc = {
description: 'Get all active security categories.',
description:
'Get all active security rules with their associated categories. A security category is active if it has not been end-dated.',
tags: ['security'],
security: [
{
Expand All @@ -39,9 +40,21 @@ GET.apiDoc = {
type: 'array',
items: {
type: 'object',
required: [
'security_category_id',
'name',
'description',
'record_effective_date',
'record_end_date',
'create_date',
'create_user',
'update_date',
'update_user',
'revision_count'
],
properties: {
security_category_id: {
type: 'number'
type: 'integer'
},
name: {
type: 'string'
Expand All @@ -60,7 +73,7 @@ GET.apiDoc = {
type: 'string'
},
create_user: {
type: 'string'
type: 'integer'
},
update_date: {
type: 'string',
Expand All @@ -71,7 +84,7 @@ GET.apiDoc = {
nullable: true
},
revision_count: {
type: 'number'
type: 'integer'
}
}
}
Expand Down Expand Up @@ -111,7 +124,7 @@ export function getActiveSecurityCategories(): RequestHandler {

return res.status(200).json(data);
} catch (error) {
defaultLog.error({ label: 'getActiveSecurityRules', message: 'error', error });
defaultLog.error({ label: 'getActiveSecurityCategories', message: 'error', error });
await connection.rollback();
throw error;
} finally {
Expand Down
120 changes: 0 additions & 120 deletions api/src/paths/administrative/security/category/fetch.ts

This file was deleted.

Loading

0 comments on commit f8fbd1e

Please sign in to comment.