Skip to content
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

[FEAT] 서비스 오픈 대비 유지보수 배포 5차 (운영) #98

Merged
merged 46 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
bec8f63
fix: 권한 있는 사용자,
selfishAltruism Mar 4, 2024
1e995e6
feat: 게시판 삭제 메세지 수정 (#87)
selfishAltruism Mar 4, 2024
6741a09
feat: 게시판 생성 시 createRoleList 수정 (#87)
selfishAltruism Mar 4, 2024
c38c58b
feat: access token 제거 (#87)
selfishAltruism Mar 4, 2024
bbbcb7b
fix: 학생회 부학생회장 권한 변경 (#87)
selfishAltruism Mar 5, 2024
7adebf1
feat: 프로필 이미지 변경 (#87)
selfishAltruism Mar 5, 2024
c6cf9e9
fix: refresh token 유지로 정책 변경 (#)
selfishAltruism Mar 5, 2024
e3aa982
feat: 학생 추방 및 탈퇴 유저 복귀 기능 추가 (#87)
selfishAltruism Mar 5, 2024
2c5dad1
feat: 동아리 회원 복구 기능 추가 (#87)
selfishAltruism Mar 5, 2024
2efa427
fix: circle card 가입 신청 페이지 이동 에러 해결 (#87)
selfishAltruism Mar 5, 2024
fdb0900
fix: 댓글 수정 기능 막기 (#87)
selfishAltruism Mar 5, 2024
39ec830
fix: post 이미지 확대 문제 해결 (#87)
selfishAltruism Mar 5, 2024
587f0c7
fix: 모바일 확대 막기 (#87)
selfishAltruism Mar 5, 2024
71609e7
feat: 부학생회장 권한 관리 페이지 생성 (#87)
selfishAltruism Mar 5, 2024
fe9a0e3
feat: 부학생회장 권한 위임 페이지 생성 (#87)
selfishAltruism Mar 5, 2024
4e8a270
feat: 부학생회장 변경 버튼 추가 및 router 추가 (#87)
selfishAltruism Mar 6, 2024
aa99ad1
feat: 로그아웃 API 추가 (#87)
selfishAltruism Mar 6, 2024
d06f55d
feat: 이용약관 페이지 추가 및 회원가입 연결 (#87)
selfishAltruism Mar 6, 2024
e4bb817
feat: 이용약관 페이지 설정에 연결 (#79)
selfishAltruism Mar 6, 2024
05262fb
chore: 사물함 반납 버튼 제거 (#87)
selfishAltruism Mar 6, 2024
1d1f8f4
chore: 다크모드 block (#87)
selfishAltruism Mar 6, 2024
88b229d
fix: 약관 페이지 생성 (#87)
selfishAltruism Mar 6, 2024
cb839d0
feat: 권한 거부 페이지 생성 (#87)
selfishAltruism Mar 6, 2024
475b6c7
fix: 동아리 회원 관리, 부회장 교체 에러 해결 (#87)
selfishAltruism Mar 6, 2024
d0ed297
fix: 부학생회장 url 수정 (#87)
selfishAltruism Mar 6, 2024
c12cb30
Merge pull request #93 from CAUCSE/feat/#87
selfishAltruism Mar 6, 2024
ea7de02
feat: 약관 정보 처리 (#87)
selfishAltruism Mar 6, 2024
760a939
feat: 학부 인증, 사용약관 router 변경, 동아리 유저 관리, 로그아웃 method 변경 (#87)
selfishAltruism Mar 7, 2024
02a054d
feat: 권한 관리 DTO 변경 (#87)
selfishAltruism Mar 7, 2024
c34fe93
fix: 접근 권한 로직 에러 수정 (#87)
selfishAltruism Mar 7, 2024
387a6c3
fix: 접근 권한 페이지 UI 수정, 게시글 수정 메뉴 수정 (#87)
selfishAltruism Mar 7, 2024
09086a5
Merge pull request #94 from CAUCSE/feat/#87
selfishAltruism Mar 7, 2024
112c4ca
feat: 게시판 생성 카테고리 추가 (#87)
selfishAltruism Mar 7, 2024
13afaf0
Merge pull request #95 from CAUCSE/feat/#87
selfishAltruism Mar 7, 2024
723e79e
feat: post 이미지 수정 (#87)
selfishAltruism Mar 7, 2024
a175b24
feat: 기본 프로필 이미지 변경 구현 (#87)
selfishAltruism Mar 7, 2024
4ab3385
fix: 동아리 게시글 생성 에러 메시지 수정 (#87)
selfishAltruism Mar 7, 2024
5b6e627
chore: 사물함 연장하기 비활성화 (#87)
selfishAltruism Mar 7, 2024
c3f7db6
feat: 대댓글 UI 수정 (#87)
selfishAltruism Mar 7, 2024
ccf7a5a
fix: 권한 관리 API 수정 (#87)
selfishAltruism Mar 7, 2024
b5d0ab5
fix: 동아리 추방 회원 복구 수정 (#87)
selfishAltruism Mar 7, 2024
58f4134
Merge pull request #96 from CAUCSE/feat/#87
selfishAltruism Mar 7, 2024
bea5658
feat: 하이퍼링크 처리. console 제거 (#87)
selfishAltruism Mar 7, 2024
1ed5eb5
chore: 접근 권한 페이지 개선 (#87)
selfishAltruism Mar 7, 2024
d7fc7f5
fix: 권한 변경 페이지 변수 변경 (#87)
selfishAltruism Mar 7, 2024
093d31c
Merge pull request #97 from CAUCSE/feat/#87
selfishAltruism Mar 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon-96x96.png" />
<meta name="description" content="중앙대학교 소프트웨어학부 학생회 홈페이지입니다. 공지사항, 학년별 게시판, 동아리 가입, 사물함 신청 등의 기능을 제공하여 소프트웨어 학생들의 불편함을 개선합니다.">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=5,viewport-fit=cover" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,viewport-fit=cover" />
<meta name="theme-color" content="#000000" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="color-scheme" content="light only"/>
<meta name="supported-color-schemes" content="light"/>
<link rel="apple-touch-icon" href="/logo192.png" />
<link rel="manifest" href="/manifest.json" />
<link rel="stylesheet preload" as="style" href="https://fonts.googleapis.com/css?family=Roboto:400,700&display=swap" />
Expand Down
20 changes: 13 additions & 7 deletions src/@types/user.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ declare namespace User {
name: string;
profileImage: string;
role: Role;
state: 'ACTIVE' | 'INACTIVE';
state: 'ACTIVE' | 'INACTIVE' | 'DROP' | 'INACTIVE_N_DROP';
studentId: string;
}

Expand All @@ -25,8 +25,6 @@ declare namespace User {
| 'LEADER_ALUMNI'
| 'COMMON'
| 'PROFESSOR'
| 'PRESIDENT_N_LEADER_CIRCLE'
| 'VICE_PRESIDENT_N_LEADER_CIRCLE'
| 'COUNCIL_N_LEADER_CIRCLE'
| 'LEADER_1_N_LEADER_CIRCLE'
| 'LEADER_2_N_LEADER_CIRCLE'
Expand Down Expand Up @@ -56,6 +54,7 @@ declare namespace User {
//#71 추가
userState: UserDto['state'];
}

export interface FindAllAdmissionsResponseDto {
content: AdmissionUserDto[];
last: boolean;
Expand Down Expand Up @@ -128,19 +127,21 @@ declare namespace User {

// findPrivilegedUsers
export interface FindPrivilegedUsersResponseDto {
presidentUsers: UserDto | null;
presidentUser: UserDto[];
vicePresidentUser: UserDto[];
councilUsers: UserDto[];
leaderGradeUsers: UserDto[];
leaderCircleUsers: UserDto[];
leaderAlumni: UserDto | null;
leaderAlumni: UserDto[];
}

export interface FindPrivilegedUsersResponse {
presidentUsers: Model.User | null;
presidentUser: Model.User[];
vicePresidentUser: Model.User[];
councilUsers: Model.User[];
leaderGradeUsers: Model.User[];
leaderCircleUsers: Model.User[];
leaderAlumni: Model.User | null;
leaderAlumni: Model.User[];
}

// ---
Expand Down Expand Up @@ -193,6 +194,11 @@ declare namespace User {
email: string;
}

export interface SignOutRequestDto {
accessToken: string;
refreshToken: string;
}

// ==

export interface FindPostsResponse {
Expand Down
5 changes: 5 additions & 0 deletions src/components/Atoms/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ export const NavButton = styled(Button)`
margin: 13px 0;
`;

export const NavSmallButton = styled(Button)`
margin: 13px 0;
font-size: 15px;
`;

const ClearButtonNative = styled('button')`
user-select: none;
padding: 0;
Expand Down
8 changes: 8 additions & 0 deletions src/components/StyledPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ export const PostProfileImage = styled.div`
}
`;

export const PostCouncilProfileImage = styled(PostProfileImage)`
border: 2px solid #312ed7;
`;

export const PostStudentLeaderProfileImage = styled(PostProfileImage)`
border: 2px solid #ff9100;
`;

export const PostAuthorNameCSS = css`
flex: 1 1 0;

Expand Down
15 changes: 10 additions & 5 deletions src/configs/axios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const API = axios.create({
export const setAccess = (token: string): unknown =>
(API.defaults.headers['Authorization'] = token);
export const resetAccess = (): unknown => delete API.defaults.headers['Authorization'];
export const getAccess = (): string => `${API.defaults.headers['Authorization']}`;

//Refresh
const storageRefreshKey = 'CAUCSE_JWT_REFRESH';
Expand Down Expand Up @@ -48,22 +49,26 @@ API.interceptors.response.use(
) {
removeRefresh();
if (location.pathname !== PAGE_URL.SignIn) location.href = PAGE_URL.SignIn;
} else if (data.errorCode === '4105') {
} else if (data.errorCode === '4105' || data.errorCode === 4105) {
const {
data: { accessToken, refreshToken },
data: { accessToken },
} = (await API.put(`/api/v1/users/token/update`, {
refreshToken: getRefresh(),
})) as AxiosResponse<{
accessToken: string;
refreshToken: string;
}>;

setAccess(accessToken);
removeRefresh();
storeRefresh(isStored, refreshToken);

config.headers['Authorization'] = accessToken;
return API.request(config);
} else if (
data.errorCode === '4107' ||
data.errorCode === 4107 ||
data.errorCode === '4000' ||
data.errorCode === 4000
) {
location.href = PAGE_URL.NoPermission;
}

return Promise.reject({
Expand Down
3 changes: 3 additions & 0 deletions src/configs/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export enum PAGE_URL {
SignUp = '/auth/signup',
FindPassword = '/auth/findPassword',
Admission = '/auth/admission',
UseTerms = '/auth/useTerms',
NoPermission = '/auth/noPermission',

Home = '/home',

Expand Down Expand Up @@ -38,6 +40,7 @@ export enum PAGE_URL {
SettingRoleLeaderCircle = '/setting/role/leader-circle',
SettingRoleAlumni = '/setting/role/alumni',
SettingRoleDelegation = '/setting/role/delegation',
SettingRoleVicePresident = '/setting/role/vice-president',
// SettingCircleBoards = '/setting/circle/boards',

// 내가 쓴 글, 댓글
Expand Down
4 changes: 4 additions & 0 deletions src/pages/auth/AuthPageSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@ import { Route, Switch } from 'react-router-dom';

import { Admission } from './admission';
import { FindPassword } from './findPassword';
import { NoPermission } from './NoPermission';
import { SignIn } from './signIn';
import { SignUp } from './signUp';
import { UseTerms } from './useTerms';

import { PAGE_URL } from '@/configs/path';

Expand All @@ -12,6 +14,8 @@ export const AuthPageSwitch: React.FC = () => (
<Route path={PAGE_URL.SignIn} component={SignIn} />
<Route path={PAGE_URL.Admission} component={Admission} />
<Route path={PAGE_URL.SignUp} component={SignUp} />
<Route path={PAGE_URL.UseTerms} component={UseTerms} />
<Route path={PAGE_URL.FindPassword} component={FindPassword} />
<Route path={PAGE_URL.NoPermission} component={NoPermission} />
</Switch>
);
39 changes: 39 additions & 0 deletions src/pages/auth/NoPermission/NoPermissionPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import styled from '@emotion/styled';
import { observer } from 'mobx-react-lite';
import React from 'react';

import { PageUiStoreImpl } from './NoPermissionPageUiStore';

import { BodyScreen, Header, PageBody, PageStoreHOC } from '@/components';
import { PAGE_URL } from '@/configs/path';

const NoPermissionPage: React.FC = observer(() => {
return (
<>
<Header withBack={PAGE_URL.Home} title="접근 불가" />
<PageBody>
<Wrapper>
<img src="/images/empty.png" alt="Empty list logo" />
<br />
페이지가 존재하지 않거나, 권한이 없습니다.
</Wrapper>
</PageBody>
</>
);
});

const Wrapper = styled.div`
margin: 160px 0 30px;
font-size: 17px;
//font-weight: bolder;
color: gray;
line-height: 12px;
text-align: center;

> img {
margin-bottom: 10px;
width: 100px;
}
`;

export default PageStoreHOC(<NoPermissionPage />, { store: PageUiStoreImpl });
9 changes: 9 additions & 0 deletions src/pages/auth/NoPermission/NoPermissionPageUiStore.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { makeAutoObservable } from 'mobx';

export class NoPermissionPageUiStore {
constructor() {
makeAutoObservable(this, {}, { autoBind: true });
}
}

export const PageUiStoreImpl = new NoPermissionPageUiStore();
1 change: 1 addition & 0 deletions src/pages/auth/NoPermission/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as NoPermission } from './NoPermissionPage';
6 changes: 3 additions & 3 deletions src/pages/auth/admission/AdmissionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ const AdmissionPage: React.FC = observer(() => {
<BodyScreen>
<Guide>
중앙대학교 전산학과 / 컴퓨터공학과 / 소프트웨어학부임을 인증할 수 있는 자료를
첨부해주세요.
첨부해주세요. 변경이 불가능하니 주의하여 입력하세요.
<br />
<br />
예) 학생증, 졸업증명서, 포탈 내 개인정보 화면 캡처
(학번/이름이 포함되게 하여 학생증, 졸업증명서, 포탈 내 개인정보 화면 캡처 중 하나 기입)
</Guide>

<Label>사진 첨부</Label>
<ImageInput name="attachImage" />
<Label>설명 첨부</Label>
<Textarea
placeholder="설명을 첨부해주세요"
placeholder="사진에 대한 설명을 첨부해주세요"
{...methods.register('description')}
maxLength={254}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/auth/findPassword/FindPasswordPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const FindPasswordPage: React.FC = observer(() => {

return (
<>
<Header title="비밀번호 재발급" withBack={PAGE_URL.Board} />
<Header title="비밀번호 재발급" withBack={PAGE_URL.SignIn} />
<PageBody>
{isSubmitting ? (
<Loading />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/auth/signIn/SignInPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const SignInPage: React.FC = observer(() => {
</Form>

<SubLink>
<Link to={PAGE_URL.SignUp}>회원가입</Link>
<Link to={PAGE_URL.UseTerms}>회원가입</Link>
<Link to={PAGE_URL.FindPassword}>비밀번호를 잃어버리셨나요?</Link>
</SubLink>
</PageWrapper>
Expand Down
Loading