[feat] negodata: 소유권 게이팅 + 견적 낙찰 + 작성자명 표시 + 전화입력 + 카드 엑셀
- 소유권 게이팅(common/authz): 변경 액션 본인∪OWNER, 협력사 삭제 OWNER 전용 - 견적 수동 낙찰(award) + 작성자명(creatorName) 표시 + 전화번호 입력 컴포넌트 + 카드 엑셀 업로드 - supplier_type 은 이번 커밋 미변경(다음 커밋에서 코드부터 정리 예정) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
c32ee300e6
commit
c62b66e35b
56 files changed
+1900
-188
No files matched your search
@@ -0,0 +1,65 @@
|
||||
"""card 도메인 스코프 e2e — 개인 카드는 소유자만, 전체(공용) 카드는 누구나.
|
||||
스코프 규칙: user_id 있으면 개인(본인만 조회·관리) / NULL 이면 전체(모든 유저 조회·수정·삭제). 로그인은 auth_headers."""
|
||||
|
||||
|
||||
async def _create_card(client, headers, *, number, name="카드", is_shared=False, is_wildcard=False):
|
||||
r = await client.post(
|
||||
"/v1/card/create",
|
||||
json={
|
||||
"is_wildcard": is_wildcard,
|
||||
"is_shared": is_shared,
|
||||
"name": name,
|
||||
"number": number,
|
||||
"script": "안녕하세요",
|
||||
},
|
||||
headers=headers,
|
||||
)
|
||||
body = r.json()
|
||||
assert body["result"]["success"] is True, body
|
||||
return body["card"]["nego_card_id"]
|
||||
|
||||
|
||||
async def _list_numbers(client, headers):
|
||||
r = await client.get("/v1/card/list", headers=headers)
|
||||
return {c["number"] for c in r.json().get("cards", [])}
|
||||
|
||||
|
||||
async def test_personal_card_is_owner_only(client, auth_headers):
|
||||
"""검증: user_id 가 박힌 개인 카드는 소유자 목록·단건조회에만 노출되고 타 유저에겐 숨는다.
|
||||
기대결과: A 목록엔 있고 B 목록엔 없음, B 의 단건 조회는 success=False(CARD_NOT_FOUND)."""
|
||||
ha = await auth_headers("cardA")
|
||||
hb = await auth_headers("cardB")
|
||||
cid = await _create_card(client, ha, number="P-1", is_shared=False)
|
||||
|
||||
assert "P-1" in await _list_numbers(client, ha)
|
||||
assert "P-1" not in await _list_numbers(client, hb)
|
||||
assert (await client.get(f"/v1/card/{cid}", headers=hb)).json()["result"]["success"] is False
|
||||
|
||||
|
||||
async def test_shared_card_visible_to_all(client, auth_headers):
|
||||
"""검증: is_shared=True 카드는 user_id NULL 로 저장돼 모든 유저 목록·단건조회에 노출된다.
|
||||
기대결과: A·B 목록 모두에 존재, 비생성자 B 의 단건 조회 success=True, is_shared 플래그 True."""
|
||||
ha = await auth_headers("cardSA")
|
||||
hb = await auth_headers("cardSB")
|
||||
cid = await _create_card(client, ha, number="S-1", is_shared=True)
|
||||
|
||||
assert "S-1" in await _list_numbers(client, ha)
|
||||
assert "S-1" in await _list_numbers(client, hb)
|
||||
got = await client.get(f"/v1/card/{cid}", headers=hb)
|
||||
assert got.json()["result"]["success"] is True
|
||||
assert got.json()["card"]["is_shared"] is True
|
||||
|
||||
|
||||
async def test_shared_card_editable_and_deletable_by_anyone(client, auth_headers):
|
||||
"""검증: 전체(공용) 카드는 소유자가 없어 아무 유저나 수정·삭제 가능(정책: 누구나).
|
||||
기대결과: 비생성자 B 의 수정·삭제 모두 success=True, 삭제 후 목록에서 사라짐."""
|
||||
ha = await auth_headers("cardEA")
|
||||
hb = await auth_headers("cardEB")
|
||||
cid = await _create_card(client, ha, number="S-EDIT", is_shared=True)
|
||||
|
||||
upd = await client.patch(f"/v1/card/update/{cid}", json={"name": "B가 수정"}, headers=hb)
|
||||
assert upd.json()["result"]["success"] is True
|
||||
|
||||
dele = await client.delete(f"/v1/card/delete/{cid}", headers=hb)
|
||||
assert dele.json()["result"]["success"] is True
|
||||
assert "S-EDIT" not in await _list_numbers(client, hb)
|
||||
@@ -0,0 +1,122 @@
|
||||
"""소유자 게이팅 — 변경 액션은 '본인 소유' 또는 '최고관리자(OWNER)'만. 프론트 버튼 차단과 같은 규칙을 백엔드가 강제한다.
|
||||
|
||||
- item(상품): 같은 회사의 다른 일반유저는 남의 상품을 수정·삭제 못 한다(OWNER는 가능).
|
||||
- quotation(견적): 남의 견적 삭제는 비소유 일반유저 차단, OWNER 허용, user_id 미지정(내부 호출)은 스킵.
|
||||
공용 판정은 common.authz.is_owner_or_admin — 여기 통과하면 다른 변경 액션(마감·재생성·초청메일)도 같은 규칙을 탄다.
|
||||
"""
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy import text
|
||||
|
||||
from common.enums import ErrorType, QuotationStatus, QuotationType, UserRole
|
||||
from crud.quotation_crud import QuotationCRUD
|
||||
from services.quotation_service import QuotationService
|
||||
|
||||
PAST = datetime(2020, 1, 1)
|
||||
|
||||
|
||||
# ===== item(상품) — HTTP e2e: 같은 회사, 다른 유저 =====
|
||||
async def test_item_update_delete_blocked_for_non_owner(client, auth_headers):
|
||||
"""검증: A가 등록한 상품을 같은 회사의 다른 일반유저 B가 수정·삭제 시도.
|
||||
기대결과: 둘 다 거부(ACCOUNT_FORBIDDEN), 상품은 원값 그대로 남는다."""
|
||||
ha = await auth_headers("item_owner") # 소유자
|
||||
hb = await auth_headers("item_other") # 같은 회사, USER
|
||||
item_id = (await client.post(
|
||||
"/v1/item/create", json={"name": "상품A", "price": 1000, "code": "OWN1"}, headers=ha
|
||||
)).json()["item"]["item_id"]
|
||||
|
||||
r_upd = await client.patch(f"/v1/item/update/{item_id}", json={"price": 9999}, headers=hb)
|
||||
assert r_upd.json()["result"]["success"] is False
|
||||
assert r_upd.json()["result"]["code"] == ErrorType.ACCOUNT_FORBIDDEN.value
|
||||
|
||||
r_del = await client.delete(f"/v1/item/delete/{item_id}", headers=hb)
|
||||
assert r_del.json()["result"]["success"] is False
|
||||
assert r_del.json()["result"]["code"] == ErrorType.ACCOUNT_FORBIDDEN.value
|
||||
|
||||
# 수정·삭제 모두 무산 — 원값으로 조회된다
|
||||
assert (await client.get(f"/v1/item/{item_id}", headers=ha)).json()["item"]["price"] == 1000
|
||||
|
||||
|
||||
async def test_item_delete_allowed_for_owner_role(client, auth_headers):
|
||||
"""검증: A가 등록한 상품을 같은 회사 최고관리자(OWNER)가 삭제.
|
||||
기대결과: 성공 — 소유자가 아니어도 OWNER는 허용."""
|
||||
ha = await auth_headers("item_owner2")
|
||||
hadmin = await auth_headers("item_admin", role=UserRole.OWNER.value)
|
||||
item_id = (await client.post(
|
||||
"/v1/item/create", json={"name": "상품B", "price": 500, "code": "OWN2"}, headers=ha
|
||||
)).json()["item"]["item_id"]
|
||||
|
||||
r = await client.delete(f"/v1/item/delete/{item_id}", headers=hadmin)
|
||||
assert r.json()["result"]["success"] is True
|
||||
|
||||
|
||||
# ===== quotation(견적) — 서비스 직접: 삭제 게이팅 =====
|
||||
async def test_quotation_delete_blocked_for_non_owner(db_engine):
|
||||
"""검증: 남의 견적을 비소유 일반유저(USER)가 삭제 시도.
|
||||
기대결과: 거부(ACCOUNT_FORBIDDEN) + soft-delete 안 됨(deleted=false)."""
|
||||
owner, other = uuid.uuid4(), uuid.uuid4()
|
||||
qt = await _seed_quotation(db_engine, user_id=owner, number="DEL-NONOWNER")
|
||||
|
||||
res = await _service().delete_quotation(str(qt), None, other, UserRole.USER.value)
|
||||
|
||||
assert res.result.success is False
|
||||
assert res.result.code == ErrorType.ACCOUNT_FORBIDDEN.value
|
||||
assert await _deleted(db_engine, qt) is False
|
||||
|
||||
|
||||
async def test_quotation_delete_allowed_for_owner_role(db_engine):
|
||||
"""검증: 남의 견적을 최고관리자(OWNER)가 삭제.
|
||||
기대결과: 성공 + deleted=true."""
|
||||
creator, admin = uuid.uuid4(), uuid.uuid4()
|
||||
qt = await _seed_quotation(db_engine, user_id=creator, number="DEL-OWNER")
|
||||
|
||||
res = await _service().delete_quotation(str(qt), None, admin, UserRole.OWNER.value)
|
||||
|
||||
assert res.result.success is True
|
||||
assert await _deleted(db_engine, qt) is True
|
||||
|
||||
|
||||
async def test_quotation_delete_skips_gate_for_internal_call(db_engine):
|
||||
"""검증: user_id 미지정(내부/스케줄러 호출)로 삭제.
|
||||
기대결과: 소유권 검사 스킵 → 성공(회사 스코프만 적용)."""
|
||||
creator = uuid.uuid4()
|
||||
qt = await _seed_quotation(db_engine, user_id=creator, number="DEL-INTERNAL")
|
||||
|
||||
res = await _service().delete_quotation(str(qt), None)
|
||||
|
||||
assert res.result.success is True
|
||||
assert await _deleted(db_engine, qt) is True
|
||||
|
||||
|
||||
# ===== 헬퍼 =====
|
||||
async def _seed_quotation(engine, *, user_id, number):
|
||||
"""견적 1건 시드(삭제 게이팅 확인용 — 상태는 무관하므로 CLOSED로 고정)."""
|
||||
qt_id = uuid.uuid4()
|
||||
async with engine.begin() as conn:
|
||||
await conn.execute(
|
||||
text(
|
||||
"INSERT INTO quotations "
|
||||
"(qt_id, user_id, qt_setting_id, version_id, name, number, type, status, "
|
||||
" round, iteration, start_time, end_time, deleted) VALUES "
|
||||
"(:qt_id, :user_id, :qt_setting_id, :version_id, '견적', :number, :type, :status, "
|
||||
" 1, 0, :t, :t, false)"
|
||||
),
|
||||
{
|
||||
"qt_id": qt_id, "user_id": user_id, "qt_setting_id": uuid.uuid4(),
|
||||
"version_id": uuid.uuid4(), "number": number, "type": QuotationType.REQUOTE.value,
|
||||
"status": QuotationStatus.CLOSED.value, "t": PAST,
|
||||
},
|
||||
)
|
||||
return qt_id
|
||||
|
||||
|
||||
async def _deleted(engine, qt_id) -> bool:
|
||||
async with engine.begin() as conn:
|
||||
return (await conn.execute(
|
||||
text("SELECT deleted FROM quotations WHERE qt_id = :q"), {"q": qt_id}
|
||||
)).scalar_one()
|
||||
|
||||
|
||||
def _service():
|
||||
return QuotationService(QuotationCRUD())
|
||||
@@ -0,0 +1,206 @@
|
||||
"""개찰 견적 직접 낙찰(award_quotation) 테스트 — 담당자가 개찰(낙찰자 미정 마감) 견적의 낙찰자를 직접 지정.
|
||||
|
||||
직접 낙찰은 자동 낙찰(close_and_decide)과 결과 컬럼은 같되(close_reason=AWARDED, preferred_sp_*),
|
||||
알림에 manual 플래그로 '직접' 낙찰임을 남긴다. 다음을 본다:
|
||||
· 개찰 + 투찰(DONE) 협력사 지정 → 낙찰 확정 + 알림 SUCCESS(manual=True)
|
||||
· 개찰 아님(이미 낙찰) → 거부(INVALID_REQUEST_DATA), 알림 없음
|
||||
· 후보 아닌 협력사 지정 → 거부, close_reason 유지
|
||||
· 낙찰 후 재지정(재클릭) → 거부(동시성 가드), 알림 1건 유지
|
||||
|
||||
세션의 협상 결과(협상완료/입찰가)와 개찰 상태(close_reason)는 협상/마감에서만 생기는 값이라 SQL 로 직접 넣는다.
|
||||
"""
|
||||
import uuid
|
||||
from datetime import datetime
|
||||
|
||||
import pytest_asyncio
|
||||
from sqlalchemy import text
|
||||
|
||||
from common.enums import CloseReason, ErrorType, QuotationStatus, QuotationType, SessionStatus, UserRole
|
||||
from crud.quotation_crud import QuotationCRUD
|
||||
from services.quotation_service import QuotationService
|
||||
|
||||
PAST = datetime(2020, 1, 1)
|
||||
|
||||
|
||||
@pytest_asyncio.fixture
|
||||
async def clean(db_engine):
|
||||
"""conftest 는 notifications 를 비우지 않는다 → 알림 단언이 다른 테스트에 안 흔들리게 여기서 함께 비운다."""
|
||||
async with db_engine.begin() as conn:
|
||||
await conn.execute(text("TRUNCATE TABLE sessions, quotations, notifications RESTART IDENTITY CASCADE"))
|
||||
return db_engine
|
||||
|
||||
|
||||
async def test_award_opened_sets_winner_and_notifies(clean):
|
||||
"""검증: 개찰(동가) 견적 + 투찰 협력사 2건(A=100, B=120) 중 A 를 직접 낙찰.
|
||||
기대결과: close_reason→낙찰, preferred_sp=A, 동가플래그 해제 + 알림 SUCCESS(manual=True, winner_price=100)."""
|
||||
engine = clean
|
||||
user_id, supplier_a = uuid.uuid4(), uuid.uuid4()
|
||||
qt = await _seed_opened(engine, user_id=user_id, number="A-WIN", close_reason=CloseReason.OPEN_EQUAL.value)
|
||||
await _add_session(engine, qt, status=SessionStatus.DONE.value, bid_price=100, supplier_id=supplier_a)
|
||||
await _add_session(engine, qt, status=SessionStatus.DONE.value, bid_price=120)
|
||||
|
||||
res = await _service().award_quotation(str(qt), None, user_id, UserRole.USER.value, supplier_a)
|
||||
|
||||
assert res.result.success is True
|
||||
row = await _quotation(engine, qt)
|
||||
assert row.close_reason == CloseReason.AWARDED.value
|
||||
assert row.preferred_sp_yn is True
|
||||
assert str(row.preferred_sp_id) == str(supplier_a)
|
||||
assert row.equal_bid_yn is False
|
||||
|
||||
notis = await _notifications(engine, user_id)
|
||||
assert len(notis) == 1
|
||||
type_, data, ref = notis[0]
|
||||
assert type_ == 1 # NotificationType.SUCCESS
|
||||
assert data["manual"] is True
|
||||
assert data["winner_price"] == 100
|
||||
assert str(ref) == str(qt)
|
||||
|
||||
|
||||
async def test_award_rejects_when_not_opened(clean):
|
||||
"""검증: 이미 낙찰된 견적(close_reason=AWARDED)에 직접 낙찰을 다시 시도.
|
||||
기대결과: 거부(INVALID_REQUEST_DATA) + 새 알림 없음."""
|
||||
engine = clean
|
||||
user_id, supplier_a = uuid.uuid4(), uuid.uuid4()
|
||||
qt = await _seed_opened(engine, user_id=user_id, number="A-DONE", close_reason=CloseReason.AWARDED.value)
|
||||
await _add_session(engine, qt, status=SessionStatus.DONE.value, bid_price=100, supplier_id=supplier_a)
|
||||
|
||||
res = await _service().award_quotation(str(qt), None, user_id, UserRole.USER.value, supplier_a)
|
||||
|
||||
assert res.result.success is False
|
||||
assert res.result.code == ErrorType.INVALID_REQUEST_DATA.value
|
||||
assert len(await _notifications(engine, user_id)) == 0
|
||||
|
||||
|
||||
async def test_award_rejects_unknown_supplier(clean):
|
||||
"""검증: 개찰 견적에, 투찰 후보가 아닌 협력사 id 를 지정.
|
||||
기대결과: 거부 + close_reason 은 개찰(OPEN_PRICE) 그대로 유지, 알림 없음."""
|
||||
engine = clean
|
||||
user_id, bidder, stranger = uuid.uuid4(), uuid.uuid4(), uuid.uuid4()
|
||||
qt = await _seed_opened(engine, user_id=user_id, number="A-STRANGER", close_reason=CloseReason.OPEN_PRICE.value)
|
||||
await _add_session(engine, qt, status=SessionStatus.DONE.value, bid_price=100, supplier_id=bidder)
|
||||
|
||||
res = await _service().award_quotation(str(qt), None, user_id, UserRole.USER.value, stranger)
|
||||
|
||||
assert res.result.success is False
|
||||
row = await _quotation(engine, qt)
|
||||
assert row.close_reason == CloseReason.OPEN_PRICE.value
|
||||
assert row.preferred_sp_id is None
|
||||
assert len(await _notifications(engine, user_id)) == 0
|
||||
|
||||
|
||||
async def test_award_is_idempotent(clean):
|
||||
"""검증: 직접 낙찰 성공 후 같은 견적에 재지정(재클릭/경합).
|
||||
기대결과: 2번째는 거부(이미 낙찰) + 알림은 1건만 유지(동시성 가드가 한 번만 통과)."""
|
||||
engine = clean
|
||||
user_id, supplier_a = uuid.uuid4(), uuid.uuid4()
|
||||
qt = await _seed_opened(engine, user_id=user_id, number="A-IDEMP", close_reason=CloseReason.OPEN_REJECT.value)
|
||||
await _add_session(engine, qt, status=SessionStatus.DONE.value, bid_price=100, supplier_id=supplier_a)
|
||||
|
||||
first = await _service().award_quotation(str(qt), None, user_id, UserRole.USER.value, supplier_a)
|
||||
second = await _service().award_quotation(str(qt), None, user_id, UserRole.USER.value, supplier_a)
|
||||
|
||||
assert first.result.success is True
|
||||
assert second.result.success is False
|
||||
assert len(await _notifications(engine, user_id)) == 1
|
||||
|
||||
|
||||
async def test_award_rejects_non_owner(clean):
|
||||
"""검증: 남의 개찰 견적을 일반 유저(비소유·USER)가 직접 낙찰 시도.
|
||||
기대결과: 거부(ACCOUNT_FORBIDDEN) + close_reason 개찰 유지 + 알림 없음."""
|
||||
engine = clean
|
||||
owner, other, supplier_a = uuid.uuid4(), uuid.uuid4(), uuid.uuid4()
|
||||
qt = await _seed_opened(engine, user_id=owner, number="A-NONOWNER", close_reason=CloseReason.OPEN_PRICE.value)
|
||||
await _add_session(engine, qt, status=SessionStatus.DONE.value, bid_price=100, supplier_id=supplier_a)
|
||||
|
||||
res = await _service().award_quotation(str(qt), None, other, UserRole.USER.value, supplier_a)
|
||||
|
||||
assert res.result.success is False
|
||||
assert res.result.code == ErrorType.ACCOUNT_FORBIDDEN.value
|
||||
row = await _quotation(engine, qt)
|
||||
assert row.close_reason == CloseReason.OPEN_PRICE.value
|
||||
assert row.preferred_sp_id is None
|
||||
assert len(await _notifications(engine, owner)) == 0
|
||||
|
||||
|
||||
async def test_award_allows_owner_role(clean):
|
||||
"""검증: 남의 개찰 견적을 최고관리자(OWNER)가 직접 낙찰.
|
||||
기대결과: 낙찰 성공 + 알림은 견적 작성자(owner) 인박스에 남는다(호출자가 아니라)."""
|
||||
engine = clean
|
||||
creator, admin, supplier_a = uuid.uuid4(), uuid.uuid4(), uuid.uuid4()
|
||||
qt = await _seed_opened(engine, user_id=creator, number="A-OWNER", close_reason=CloseReason.OPEN_EQUAL.value)
|
||||
await _add_session(engine, qt, status=SessionStatus.DONE.value, bid_price=100, supplier_id=supplier_a)
|
||||
|
||||
res = await _service().award_quotation(str(qt), None, admin, UserRole.OWNER.value, supplier_a)
|
||||
|
||||
assert res.result.success is True
|
||||
row = await _quotation(engine, qt)
|
||||
assert row.close_reason == CloseReason.AWARDED.value
|
||||
assert str(row.preferred_sp_id) == str(supplier_a)
|
||||
assert len(await _notifications(engine, creator)) == 1
|
||||
assert len(await _notifications(engine, admin)) == 0
|
||||
|
||||
|
||||
# ===== 헬퍼 =====
|
||||
async def _seed_opened(engine, *, user_id, number, close_reason, round_=1):
|
||||
"""개찰/낙찰 상태(status=CLOSED + close_reason)로 견적 1건 시드. 낙찰자 컬럼은 비운 채 시작."""
|
||||
qt_id = uuid.uuid4()
|
||||
async with engine.begin() as conn:
|
||||
await conn.execute(
|
||||
text(
|
||||
"INSERT INTO quotations "
|
||||
"(qt_id, user_id, qt_setting_id, version_id, name, number, type, status, close_reason, "
|
||||
" round, iteration, start_time, end_time, deleted) VALUES "
|
||||
"(:qt_id, :user_id, :qt_setting_id, :version_id, '견적A', :number, :type, :status, :close_reason, "
|
||||
" :round, 0, :start_time, :end_time, false)"
|
||||
),
|
||||
{
|
||||
"qt_id": qt_id, "user_id": user_id, "qt_setting_id": uuid.uuid4(),
|
||||
"version_id": uuid.uuid4(), "number": number, "type": QuotationType.REQUOTE.value,
|
||||
"status": QuotationStatus.CLOSED.value, "close_reason": close_reason,
|
||||
"round": round_, "start_time": PAST, "end_time": PAST,
|
||||
},
|
||||
)
|
||||
return qt_id
|
||||
|
||||
|
||||
async def _add_session(engine, qt_id, *, status, bid_price=None, supplier_id=None):
|
||||
"""세션 1건 시드(공급사 협상 1건). status/bid_price 로 협상완료·입찰가를 만든다."""
|
||||
async with engine.begin() as conn:
|
||||
await conn.execute(
|
||||
text(
|
||||
"INSERT INTO sessions "
|
||||
"(session_id, quotation_id, item_id, supplier_id, qt_number, qt_round, qt_type, "
|
||||
" target_price, status, bid_price, end_time) VALUES "
|
||||
"(:session_id, :quotation_id, :item_id, :supplier_id, 'Q', 1, :qt_type, "
|
||||
" 0, :status, :bid_price, :end_time)"
|
||||
),
|
||||
{
|
||||
"session_id": uuid.uuid4(), "quotation_id": qt_id, "item_id": uuid.uuid4(),
|
||||
"supplier_id": supplier_id or uuid.uuid4(), "qt_type": QuotationType.REQUOTE.value,
|
||||
"status": status, "bid_price": bid_price, "end_time": PAST,
|
||||
},
|
||||
)
|
||||
|
||||
|
||||
async def _quotation(engine, qt_id):
|
||||
"""견적 1행(마감 결과 컬럼 확인용)."""
|
||||
async with engine.begin() as conn:
|
||||
return (await conn.execute(
|
||||
text("SELECT close_reason, preferred_sp_yn, preferred_sp_id, equal_bid_yn "
|
||||
"FROM quotations WHERE qt_id = :qt_id"),
|
||||
{"qt_id": qt_id},
|
||||
)).one()
|
||||
|
||||
|
||||
async def _notifications(engine, user_id):
|
||||
"""user_id(작성자) 인박스 알림 (type, data, ref_qt_id) — 생성순."""
|
||||
async with engine.begin() as conn:
|
||||
return (await conn.execute(
|
||||
text("SELECT type, data, ref_qt_id FROM notifications WHERE user_id = :uid ORDER BY created_at"),
|
||||
{"uid": user_id},
|
||||
)).all()
|
||||
|
||||
|
||||
def _service():
|
||||
return QuotationService(QuotationCRUD())
|
||||
Reference in new issue
Block a user