Sha256: 8357bb7e3a9d32123ff0e17ebb6e066628a2001b2a26ed574b62563417ff4e4b

Contents?: true

Size: 1.56 KB

Versions: 22

Compression:

Stored size: 1.56 KB

Contents

CanTango operates with the concepts of a Guest user and a Guest account.

## Guest user

In case the `curent_xxx_` method does't return a valid user, Cantango will attempt to return 
a guest user according to configuration and conventions.

If Cantango has not been configured with specific Guest user configuration, it will see if the User model 
is available. If so, it will call `#guest` on it (if method available).

## Configuration

Cantango should be configured with how to retrieve (or create) such a guest user via:

`CanTango::Configuration.guest.user obj`

The `obj` argument can be either:

* User instance
* A procedure in the form of a lambda or Proc
* A block

The Guest user should normally have restricted permission rules, mostly only :read access.
We recommend setting the Guest permission rules to: `can :read, :all` and refine from there.

## Guest user account

In case the `curent_xxx_account` method does't return a valid user account, Cantango will attempt to return 
a guest user account according to configuration and conventions.

If Cantango has not been configured with specific Guest user account configuration, it will 
see if the UserAccount model is available.
If so, it will call `#guest` on it (if method available).

## Configuration

Cantango should be configured with how to retrieve (or create) such a guest user via:

`CanTango::Configuration.guest.account obj`

The `obj` argument can be either:

* UserAccount instance
* A procedure in the form of a lambda or Proc
* A block

The Guest user account should usually be setup to have a guest user only.


Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
cantango-0.9.4.7 wiki/config/guest.markdown
cantango-0.9.4.6 wiki/config/guest.markdown
cantango-0.9.4.5 wiki/config/guest.markdown
cantango-0.9.4.3 wiki/config/guest.markdown
cantango-0.9.4.2 wiki/config/guest.markdown
cantango-0.9.4.1 wiki/config/guest.markdown
cantango-0.9.4 wiki/config/guest.markdown
cantango-0.9.3.2 wiki/config/guest.markdown
cantango-0.8.9.5 wiki/config/guest.markdown
cantango-0.8.9.4 wiki/config/guest.markdown
cantango-0.8.9.3 wiki/config/guest.markdown
cantango-0.8.9.2 wiki/config/guest.markdown
cantango-0.8.9.1 wiki/config/guest.markdown
cantango-0.8.9 wiki/config/guest.markdown
cantango-0.8.8.1 wiki/config/guest.markdown
cantango-0.8.8 wiki/config/guest.markdown
cantango-0.8.7 wiki/config/guest.markdown
cantango-0.8.6.2 wiki/config/guest.markdown
cantango-0.8.6.1 wiki/config/guest.markdown
cantango-0.8.6 wiki/config/guest.markdown