Guest accounts in spotlight/blacklight

82 views
Skip to first unread message

David Zuckerman

unread,
Jun 1, 2017, 2:27:13 PM6/1/17
to Blacklight Development
This is in spotlight 0.34.1 using Blacklight 6.8.


I notice that a guest user is created in the db every time a user accesses the site even though they don't specifically create an account. Looks like it's so users can bookmark etc. without specifically creating an account.

Is there a way to turn off this functionality? Can't seem to find anything in the documentation regarding that and doesn't seem possible in the UI.


Thanks,
Dave

Justin Coyne

unread,
Jun 1, 2017, 4:13:35 PM6/1/17
to blacklight-...@googlegroups.com
Have you tried removing `devise-guests' from the Gemfile?  I think that ought to do it.

-Justin


--
You received this message because you are subscribed to the Google Groups "Blacklight Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blacklight-development+unsub...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Chris Beer

unread,
Jun 1, 2017, 4:45:45 PM6/1/17
to blacklight-...@googlegroups.com
I think it’s a little trickier than that. You’ll also need to provide an alternative implementation for `current_or_guest_user` in your ApplicationController (and make it a helper method?), maybe something like:

```
def current_or_guest_user
  current_user || User.new
end
helper_method :current_or_guest_user
```

To unsubscribe from this group and stop receiving emails from it, send an email to blacklight-develo...@googlegroups.com.

David Zuckerman

unread,
Jun 1, 2017, 5:14:39 PM6/1/17
to Blacklight Development
Thanks Justin and Chris!
Reply all
Reply to author
Forward
0 new messages