Skip to content

Commit 5b62588

Browse files
authored
Merge pull request #1749 from codidact/0valt/914/restricted_categories
Do not show restricted categories for users who can't see them in the list of targets
2 parents dbe8e27 + ce225dd commit 5b62588

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/controllers/categories_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class CategoriesController < ApplicationController
55
before_action :verify_view_access, except: [:index, :homepage, :new, :create, :post_types]
66

77
def index
8-
@categories = Category.all.order(sequence: :asc, id: :asc)
8+
@categories = Category.accessible_to(current_user).all.order(sequence: :asc, id: :asc)
99
respond_to do |format|
1010
format.html
1111
format.json do

0 commit comments

Comments
 (0)