Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 21 additions & 1 deletion config/mbin_routes/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,24 @@ tag_ban:
tag_unban:
path: /tag/{name}/unban
methods: [POST]
controller: App\Controller\Tag\TagBanController::unban
controller: App\Controller\Tag\TagBanController::unban

tag_block:
controller: App\Controller\Tag\TagBlockController::block
path: /tag/{name}/block
methods: [ POST ]

tag_unblock:
controller: App\Controller\Tag\TagBlockController::unblock
path: /tag/{name}/unblock
methods: [ POST ]

tag_subscribe:
controller: App\Controller\Tag\TagSubscriptionController::subscribe
path: /tag/{name}/subscribe
methods: [ POST ]

tag_unsubscribe:
controller: App\Controller\Tag\TagSubscriptionController::unsubscribe
path: /tag/{name}/unsubscribe
methods: [ POST ]
36 changes: 36 additions & 0 deletions config/mbin_routes/tag_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,39 @@ api_tag_post_comments:
path: /api/tag/{name}/postComments
methods: [ GET ]
format: json

api_tag_block:
controller: App\Controller\Api\Tag\TagBlockApiController::block
path: /api/tag/{name}/block
methods: [ PUT ]
format: json

api_tag_unblock:
controller: App\Controller\Api\Tag\TagBlockApiController::unblock
path: /api/tag/{name}/unblock
methods: [ PUT ]
format: json

api_tag_blocked:
controller: App\Controller\Api\Tag\TagBlockApiController::list
path: /api/tags/blocked
methods: [ GET ]
format: json

api_tag_subscribe:
controller: App\Controller\Api\Tag\TagSubscriptionApiController::subscribe
path: /api/tag/{name}/subscribe
methods: [ PUT ]
format: json

api_tag_unsubscribe:
controller: App\Controller\Api\Tag\TagSubscriptionApiController::unsubscribe
path: /api/tag/{name}/unsubscribe
methods: [ PUT ]
format: json

api_tag_subscribed:
controller: App\Controller\Api\Tag\TagSubscriptionApiController::list
path: /api/tags/subscribed
methods: [ GET ]
format: json
10 changes: 10 additions & 0 deletions config/mbin_routes/user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,11 @@ user_settings_domain_blocks:
path: /settings/blocked/domains
methods: [GET]

user_settings_tag_blocks:
controller: App\Controller\User\Profile\UserBlockController::hashtags
path: /settings/blocked/tags
methods: [GET]

user_settings_user_blocks:
controller: App\Controller\User\Profile\UserBlockController::users
path: /settings/blocked/people
Expand All @@ -180,6 +185,11 @@ user_settings_domain_subscriptions:
path: /settings/subscriptions/domains
methods: [GET]

user_settings_hashtag_subscriptions:
controller: App\Controller\User\Profile\UserSubController::hashtags
path: /settings/subscriptions/hashtags
methods: [GET]

user_settings_user_subscriptions:
controller: App\Controller\User\Profile\UserSubController::users
path: /settings/subscriptions/people
Expand Down
3 changes: 3 additions & 0 deletions config/packages/league_oauth2_server.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ league_oauth2_server:
"domain",
"domain:subscribe",
"domain:block",
"hashtag",
"hashtag:block",
"hashtag:subscribe",
"entry",
"entry:create",
"entry:edit",
Expand Down
18 changes: 12 additions & 6 deletions config/packages/nelmio_api_doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,14 @@ nelmio_api_doc:
delete: Delete any of your threads, posts, or comments.
report: Report threads, posts, or comments.
vote: Upvote, downvote, or boost threads, posts, or comments.
subscribe: Subscribe or follow any magazine, domain, or user, and view the magazines, domains, and users you subscribe to.
subscribe: Subscribe or follow any magazine, domain, or user, and view the magazines, domains, and users you subscribed to.
block: Block or unblock any magazine, domain, or user, and view the magazines, domains, and users you have blocked.
domain: Subscribe to or block domains, and view the domains you subscribe to or block.
domain:subscribe: Subscribe or unsubscribe to domains and view the domains you subscribe to.
domain: Subscribe to or block domains, and view the domains you subscribed to or block.
domain:subscribe: Subscribe or unsubscribe to domains and view the domains you subscribed to.
domain:block: Block or unblock domains and view the domains you have blocked.
hashtag: Block hashtags, and view the hashtags you subscribed to.
hashtag:block: Block or unblock hashtags and view the hashtags you have blocked.
hashtag:subscribe: Subscribe or unsubscribe to hashtags and view the hashtags you subscribed to.
entry: Create, edit, or delete your threads, and vote, boost, or report any thread.
entry:create: Create new threads.
entry:edit: Edit your existing threads.
Expand Down Expand Up @@ -226,11 +229,14 @@ nelmio_api_doc:
delete: Delete any of your threads, posts, or comments.
subscribe: Report threads, posts, or comments.
block: Upvote, downvote, or boost threads, posts, or comments.
vote: Subscribe or follow any magazine, domain, or user, and view the magazines, domains, and users you subscribe to.
vote: Subscribe or follow any magazine, domain, or user, and view the magazines, domains, and users you subscribed to.
report: Block or unblock any magazine, domain, or user, and view the magazines, domains, and users you have blocked.
domain: Subscribe to or block domains, and view the domains you subscribe to or block.
domain:subscribe: Subscribe or unsubscribe to domains and view the domains you subscribe to.
domain: Subscribe to or block domains, and view the domains you subscribed to or block.
domain:subscribe: Subscribe or unsubscribe to domains and view the domains you subscribed to.
domain:block: Block or unblock domains and view the domains you have blocked.
hashtag: Block hashtags, and view the hashtags you block.
hashtag:block: Block or unblock hashtags and view the hashtags you have blocked.
hashtag:subscribe: Subscribe or unsubscribe to hashtags and view the hashtags you subscribed to.
entry: Create, edit, or delete your threads, and vote, boost, or report any thread.
entry:create: Create new threads.
entry:edit: Edit your existing threads.
Expand Down
4 changes: 4 additions & 0 deletions config/packages/security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ security:
[
'ROLE_OAUTH2_DOMAIN:SUBSCRIBE',
'ROLE_OAUTH2_MAGAZINE:SUBSCRIBE',
'ROLE_OAUTH2_HASHTAG:SUBSCRIBE',
'ROLE_OAUTH2_USER:FOLLOW',
]
'ROLE_OAUTH2_BOOKMARK':
Expand All @@ -202,11 +203,14 @@ security:
ROLE_OAUTH2_BLOCK:
[
'ROLE_OAUTH2_DOMAIN:BLOCK',
'ROLE_OAUTH2_HASHTAG:BLOCK',
'ROLE_OAUTH2_MAGAZINE:BLOCK',
'ROLE_OAUTH2_USER:BLOCK',
]
ROLE_OAUTH2_DOMAIN:
['ROLE_OAUTH2_DOMAIN:SUBSCRIBE', 'ROLE_OAUTH2_DOMAIN:BLOCK']
ROLE_OAUTH2_HASHTAG:
['ROLE_OAUTH2_HASHTAG:BLOCK', 'ROLE_OAUTH2_HASHTAG:SUBSCRIBE']
ROLE_OAUTH2_ENTRY:
[
'ROLE_OAUTH2_ENTRY:CREATE',
Expand Down
Loading
Loading