```ruby
class Groups::DirectoryController < ApplicationController

  def index
    @groups = Group.paginate(pagination_params)
  end

end

```

Set up to have directory controller work like people controller. HOwever, currently acts_as_site_limited messed up pagination.
user
```ruby
class Groups::DirectoryController < ApplicationController

  def index
    if !logged_in?
      @groups = Group.access_by(:public).allows(:view).paginate(pagination_params)
    else
      @groups = Group.access_by(current_user).allows(:view).paginate(pagination_params)
    end
  end

end

```
assistant