Skip to content

Commit

Permalink
Renamed privileged-service back to server
Browse files Browse the repository at this point in the history
  • Loading branch information
evert committed Sep 25, 2023
1 parent 2299910 commit df03351
Show file tree
Hide file tree
Showing 35 changed files with 34 additions and 34 deletions.
2 changes: 1 addition & 1 deletion src/app/controller/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import { BadRequest, Conflict, NotFound, UnprocessableEntity } from '@curveball/http-errors';
import * as hal from '../formats/hal';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';

type NewPrincipalBody = {
nickname: string;
Expand Down
2 changes: 1 addition & 1 deletion src/app/controller/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import * as privilegeService from '../../privilege/service';
import * as hal from '../formats/hal';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';

type EditPrincipalBody = {
nickname: string;
Expand Down
2 changes: 1 addition & 1 deletion src/app/controller/new.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import { createAppForm } from '../formats/html';
import { uuidUrn } from '../../crypto';

Expand Down
2 changes: 1 addition & 1 deletion src/group/controller/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import { BadRequest, Conflict, NotFound } from '@curveball/http-errors';
import * as hal from '../formats/hal';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';

type NewPrincipalBody = {
nickname: string;
Expand Down
2 changes: 1 addition & 1 deletion src/group/controller/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import * as privilegeService from '../../privilege/service';
import * as hal from '../formats/hal';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import { NotFound, Conflict } from '@curveball/http-errors';

type EditPrincipalBody = {
Expand Down
2 changes: 1 addition & 1 deletion src/group/controller/new.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import { createGroupForm } from '../formats/html';
import { uuidUrn } from '../../crypto';

Expand Down
2 changes: 1 addition & 1 deletion src/home/service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ServerStats } from '../types';
import { getPrincipalStats } from '../principal/privileged-service';
import { getPrincipalStats } from '../principal/service';
import { findPrivileges } from '../privilege/service';
import { lastTokenId } from '../oauth2/service';

Expand Down
2 changes: 1 addition & 1 deletion src/log/controller/user.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import { Forbidden } from '@curveball/http-errors';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import csv from '../formats/csv';
import * as logService from '../service';

Expand Down
2 changes: 1 addition & 1 deletion src/login/controller/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { EventType } from '../../log/types';
import { MFALoginSession } from '../../mfa/types';
import * as webAuthnService from '../../mfa/webauthn/service';
import { getSetting } from '../../server-settings';
import { hasUsers, PrincipalService } from '../../principal/privileged-service';
import { hasUsers, PrincipalService } from '../../principal/service';
import * as userService from '../../user/service';
import { User } from '../../types';
import { isValidRedirect } from '../utilities';
Expand Down
2 changes: 1 addition & 1 deletion src/oauth2-client/controller/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Context } from '@curveball/core';
import { Forbidden, UnprocessableEntity } from '@curveball/http-errors';

import * as hal from '../formats/hal';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import { GrantType } from '../../types';
import { OAuth2Client } from '../types';
import { findByApp, create } from '../service';
Expand Down
2 changes: 1 addition & 1 deletion src/oauth2-client/controller/edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import * as hal from '../formats/hal';
import { Forbidden, NotFound, UnprocessableEntity } from '@curveball/http-errors';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import { findByClientId, edit } from '../service';
import * as oauth2Service from '../../oauth2/service';
import { GrantType } from '../../types';
Expand Down
2 changes: 1 addition & 1 deletion src/oauth2-client/controller/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Context } from '@curveball/core';
import * as hal from '../formats/hal';
import { Forbidden, NotFound } from '@curveball/http-errors';
import { findByClientId } from '../service';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import * as oauth2Service from '../../oauth2/service';

class ClientController extends Controller {
Expand Down
2 changes: 1 addition & 1 deletion src/oauth2-client/controller/new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import * as siren from '../formats/siren';
import { Forbidden } from '@curveball/http-errors';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';

class NewClientController extends Controller {

Expand Down
2 changes: 1 addition & 1 deletion src/oauth2-client/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Oauth2ClientsRecord } from 'knex/types/tables';
import { wrapError, UniqueViolationError } from 'db-errors';

import { OAuth2Client } from './types';
import { PrincipalService } from '../principal/privileged-service';
import { PrincipalService } from '../principal/service';
import db, { insertAndGetId } from '../database';
import { InvalidRequest } from '../oauth2/errors';
import parseBasicAuth from './parse-basic-auth';
Expand Down
2 changes: 1 addition & 1 deletion src/oauth2/controller/active-sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Forbidden, NotFound, NotImplemented } from '@curveball/http-errors';

import * as csv from '../formats/csv';

import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import * as oauth2Service from '../service';
import * as oauth2ClientService from '../../oauth2-client/service';

Expand Down
2 changes: 1 addition & 1 deletion src/oauth2/controller/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import log from '../../log/service';
import { EventType } from '../../log/types';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import * as userService from '../../user/service';
import { User } from '../../types';
import { InvalidGrant, InvalidRequest, UnsupportedGrantType } from '../errors';
Expand Down
2 changes: 1 addition & 1 deletion src/oauth2/controller/user-access-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Forbidden } from '@curveball/http-errors';

import log from '../../log/service';
import { EventType } from '../../log/types';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import * as oauth2Service from '../service';

class UserAccessTokenController extends Controller {
Expand Down
2 changes: 1 addition & 1 deletion src/oauth2/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as crypto from 'crypto';

import db, { query } from '../database';
import { getSetting } from '../server-settings';
import { PrincipalService } from '../principal/privileged-service';
import { PrincipalService } from '../principal/service';
import { InvalidGrant, InvalidRequest, UnauthorizedClient } from './errors';
import { CodeChallengeMethod, OAuth2Code, OAuth2Token } from './types';
import { OAuth2Client } from '../oauth2-client/types';
Expand Down
2 changes: 1 addition & 1 deletion src/one-time-token/controller/exchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { tokenResponse } from '../../oauth2/formats/json';
import * as tokenService from '../service';
import * as oauth2Service from '../../oauth2/service';
import * as oauth2ClientService from '../../oauth2-client/service';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';

type OtteRequest = {
activateUser?: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/one-time-token/controller/generate.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import { createToken } from '../service';
import * as hal from '../formats/hal';
import { resolve } from 'url';
Expand Down
2 changes: 1 addition & 1 deletion src/one-time-token/service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { OneTimeToken } from './types';
import { User } from '../types';
import db from '../database';
import { PrincipalService } from '../principal/privileged-service';
import { PrincipalService } from '../principal/service';
import { BadRequest } from '@curveball/http-errors';
import { generateSecretToken } from '../crypto';

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/privilege/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import db, { query } from '../database';
import { Principal } from '../types';
import { Privilege, PrivilegeMap, PrivilegeEntry } from './types';
import { UserPrivilegesRecord } from 'knex/types/tables';
import { PrincipalService } from '../principal/privileged-service';
import { PrincipalService } from '../principal/service';
import { Forbidden } from '@curveball/http-errors';


Expand Down
2 changes: 1 addition & 1 deletion src/register/controller/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import { Forbidden, NotFound } from '@curveball/http-errors';
import { getSetting } from '../../server-settings';
import { PrincipalService, hasUsers } from '../../principal/privileged-service';
import { PrincipalService, hasUsers } from '../../principal/service';
import * as userService from '../../user/service';
import { registrationForm } from '../formats/html';
import * as privilegeService from '../../privilege/service';
Expand Down
2 changes: 1 addition & 1 deletion src/reset-password/controller/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Context } from '@curveball/core';
import { NotFound, BadRequest } from '@curveball/http-errors';
import log from '../../log/service';
import { EventType } from '../../log/types';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import { resetPasswordRequestForm } from '../formats/html';
import { sendResetPasswordEmail } from '../service';

Expand Down
2 changes: 1 addition & 1 deletion src/user-app-permissions/controller/user-collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import * as hal from '../formats/hal';
import * as userAppPermissionService from '../service';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';

class UserAppPermissionsCollection extends Controller {

Expand Down
2 changes: 1 addition & 1 deletion src/user-app-permissions/controller/user-item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import * as hal from '../formats/hal';
import { Forbidden } from '@curveball/http-errors';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import * as userAppPermissionService from '../service';

class UserAppPermissionsItem extends Controller {
Expand Down
2 changes: 1 addition & 1 deletion src/user-app-permissions/service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import db from '../database';
import { App, User } from '../types';
import { UserAppPermission } from './types';
import { PrincipalService } from '../principal/privileged-service';
import { PrincipalService } from '../principal/service';
import { UserAppPermissionsRecord } from 'knex/types/tables';
import { NotFound } from '@curveball/http-errors';

Expand Down
2 changes: 1 addition & 1 deletion src/user/controller/by-href.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';

class UserByHrefController extends Controller {

Expand Down
2 changes: 1 addition & 1 deletion src/user/controller/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import { BadRequest, Conflict, NotFound } from '@curveball/http-errors';
import * as hal from '../formats/hal';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';

type NewPrincipalBody = {
nickname: string;
Expand Down
2 changes: 1 addition & 1 deletion src/user/controller/edit.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import * as hal from '../formats/hal';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';

class UserEditController extends Controller {

Expand Down
2 changes: 1 addition & 1 deletion src/user/controller/item.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as userHal from '../formats/hal';
import * as appHal from '../../app/formats/hal';
import * as groupHal from '../../group/formats/hal';
import * as userService from '../service';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';

type EditPrincipalBody = {
nickname: string;
Expand Down
2 changes: 1 addition & 1 deletion src/user/controller/new.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import { NotFound, UnprocessableEntity } from '@curveball/http-errors';
import { PrincipalService, isIdentityValid } from '../../principal/privileged-service';
import { PrincipalService, isIdentityValid } from '../../principal/service';
import { createUserForm } from '../formats/html';

type UserNewForm = {
Expand Down
2 changes: 1 addition & 1 deletion src/user/controller/password.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Controller from '@curveball/controller';
import { Context } from '@curveball/core';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
import * as userService from '../service';

class UserPasswordController extends Controller {
Expand Down
2 changes: 1 addition & 1 deletion src/user/controller/privileges.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BadRequest } from '@curveball/http-errors';
import * as privilegeService from '../../privilege/service';
import { PrivilegeMap } from '../../privilege/types';
import * as hal from '../formats/hal';
import { PrincipalService } from '../../principal/privileged-service';
import { PrincipalService } from '../../principal/service';
// import * as groupService from '../../group/service';

type PolicyForm = {
Expand Down

0 comments on commit df03351

Please sign in to comment.