简体   繁体   中英

Adding Users support to ComfortableMexicanSofa

I ma new user to the CMS, after extensive search on google and through the github repo of comfy, all i found is this file - http_auth.rb, where i can add name:password pairs, i think this is for basic http auth.

here's from the manual:


After finishing installation you should be able to navigate to http://abcd.com/admin

Default username and password is 'username' and 'password'. You probably want to change it right away. Admin credentials (among other things) can be found and changed in the cms initializer: /config/initializers/comfortable_mexican_sofa.rb

Before creating pages and populating them with content we need to create a Site. Site defines a hostname, content path and it's language.


as i see now, this actually means there can only be one user, the admin? no user support like in wordpress etc?

There's a good extension gem built on Devise called cms-fortress . This is likely the easiest way to add multiple users to a Comfy rails app.

By default you get a new admin route at /cms-admin and login:

username: admin@cmsfortress.com
password: 1234qwer

Other more advanced features like user permissions are also implemented.

Out of the box ComfortableMexicanSofa only supports BasicAuth. So yeah, only one "admin". This CMS doesn't have a user/auth system because it doesn't want to take away freedom of choice from you (see Refinery / Devise ).

However, it's very easy to make it work with whatever you want. See: https://github.com/comfy/comfortable-mexican-sofa/wiki/Changing-default-authentication

This way you can use your existing Devise / Sorcery / whatever else auth system.

Also, for many installs Devise is a major overkill. Sometimes one admin user is more than enough.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM