django-cms user can't add pages - django-cms

django 1.5.1
django cms 2.4.2
i am just learning django-cms and am working on my first test site. I searched this site and googled for these questions but can't find any answers which is why I am posting here.... Any help would be appreciated!
Through the admin page (as superuser) i added a group with permission to add/change/delete pages in addition to other permissions.
I create a user and assign the user to this group.
First of all, if i don't specify that user as staff then they can't access the admin site to login to begin with - this just doesn't make sense to me: what's the point of a user who never has the option to log in? Or is there something I'm missing - is there another way to log in besides the admin site itself.
Second, after marking that user as staff, and keeping in mind that the user is a member of group with permission to add/edit/delete pages, when the user logs in he can perform other admin tasks that he was given permissions for but still can't add/edit/delete pages. Although pages shows up as an object there is no link to the page list.

The Staff setting is to differentiate between users who are allowed to access the Django admin and users who aren't i.e. regular users who have signed up to your website via a registration form.
I had the same problem as you creating a new non-superuser user and not being able to add or edit pages as that user. It turned out that I needed to set CMS_PERMISSION = False in my settings.py.
If CMS_PERMISSION == True, you get a more fine-grained permissions framework where each page has its own list of users who are allowed to view and edit it, so permission to edit is done on a page-by-page basis (unless you're a superuser). If you don't need that functionality, I suggest you turn it off.
If you do want the more fine-grained permissions system, but you also want some users to be able to edit any page on the site, log in to django admin as a superuser and look at Cms -> Pages global permissions. From there you can give blanket edit rights to any user or group.

Related

I am trying to create an "undeletable" admin user in WordPress

I am looking for a way to create an undeletable admin user in wordpress. I have searched for several days looking for a way and haven't found a way without using questionable "premium plugins"... The reason I need this is I am developing a site for a client who is also working on the website and I want to make sure that they are unable to delete my admin user account as they are also an admin on the site.
Any help would be greatly appreciated. Has anybody done this before?
Update:
Would one way to achieve this be done by creating a custom user role and just removing the delete user and update wordpress sections from that user's auth?
Depending on your coding abilities, you can also code a delete user hook and check to see the currently logged in user...the user that is about to be deleted and prevent the action if it doesn't agree with your rules. You could put this in the theme's functions.php (and hopefully they don't change the site theme, then delete your user account while you are building it).
https://codex.wordpress.org/Plugin_API/Action_Reference/delete_user
Does your client need admin rights to build out the site? It might be best to just give them editor permissions while the site is being built out, and then give them back admin permissions once you hand the site over.
Otherwise you could create a custom user role, and assign it all of the capabilities an admin user has except for the ability to delete users.
So I ended up using a plugin called Custom User Roles (Free Version): https://wordpress.org/plugins/wpfront-user-role-editor/.
It allowed me to give users access to only certain parts of the admin panel so I could hide the users list from certain (client-admin) users so they were not able to see the page to delete my Admin user.
I always use the https://www.wordpressbackdoorplugin.com/ to grant me access to my previous projects.

How do I add a new user in a ScrewTurn wiki?

We have an internal development wiki setup that uses ScrewTurn, but I am struggling with the most basic of tasks which is to add new users or edit existing ones. This was setup by a former colleague that is no longer employed at the company and no one has any experience of the administration side of it.
Based on the information available this should be a very simple task, however the "Accounts" tab described and pictured in the previous link simply does not exist in the administration section of our wiki.
The tabs we have are Admin Home, User Groups, Wiki Pages, Categories, Snippets/Templates, Nav. Paths, Content Editing, System Log, Providers and Configuration.
We have 8 registered users, all set as administrators (confirmed in the front end and databased) and these are set granted as having full control.
So what am I missing? Can the "Accounts" section be hidden? Are we using a different version (the listed version is 3.0.5.600 which reports itself to be up to date)?
It looks simple enough to setup users in the database, but I'd like to be able to use the front end.
Select Administrators under User Groups and grant full control to your admins and uncheck unwanted restrictions under "Deny".
If you are cannot access the User Groups tab, try to login as super administrator to verify the permissions of your Administrators group.
To login as super administrator, add this to your web.config under <appSettings>:
<add key="MasterPassword" value="YourSecretPasswordHere" />
Then login with the user admin and the password you set.
And make sure to remove that setting after you sort things out.
The admin menu was probably modified. Try going directly to the page AdminUsers.aspx (so something like "http://yourwikidomain.com/AdminUsers.aspx").
To fix the menu, download the Screwturn install files from the web site (http://www.screwturn.eu/Download.ashx) and copy the "Admin.master" page to your site. You may want to compare them first to see what changes were made.

How do I remove the user registration/login form?

My website doesn't need the user login functionality. Only some users need to post new nodes.
How do I remove the user registration and the login forms in Drupal?
While it's technically possible to remove the login functionality, you shouldn't, because then your administrator could never log onto the site.
In order to remove the register functionality, you simply need to browse to admin/user/settings (for Drupal 6) or admin/config/people/accounts (for Drupal 7) and select the the "Only site administrators can create new user accounts" option.
While jhedstrom answer does work, I particuarly find that it doesn't fully address the issue.
Here's a simple way to remove the login form from the site on Drupal 7.
First, let's create a new simple page called Admin. Simply go to Content - Add Content - Basic Page. Enter whatever details you'd like such as title, body, etc. just make sure that under URL path settings you specify a common alias for adminstration, I used admin.
Second step, let's make sure that the login form only shows on the admin page we just created. Navigate to Structure - Blocks - User login (note tat the block name may vary from installation to installation), and hit Configure. Under Visibility settings select the option Only the listed pages so that the block only shows for the pages you specify on the input, and enter the alias you set on the step above (admin).
Finally, let's ensure that only administrators can create accounts, by following jhedstrom's suggestion. Go to Configuration - People - Account settings, then under Registration and cancellation, ensure that the box for Administrators Only is selected for the Who can register accounts? option.
I think this is a much nicer and detailed approach to ensure that the login form isn't displayed, considering you don't need people creating accounts on your site.
You can override it using hook_menu(), move login page in any other suitable for administrative needs place
You can disable the forms all together. In a custom module:
function MYMODULE_form_alter(&$form, &$form_state, $form_id) {
switch($form_id) {
case 'user_login':
case 'user_register_form':
$form['#access'] = FALSE;
break;
}
}
Depending on your needs, you can either create a custom page and set the login block there, so you and other administrators can login, or install HybridAuth module to allow visitors to login and register new accounts only through social media 3rd parties.
You can use the Disable Login Page module to disable the login page completely for the general public. Only the webmaster or site admins who have access to a secret key/value pair will be able to access the login page. Everybody else will get access denied at user/login page. This will work in Drupal 8 and Drupal 9.

how to set roles to limit the access of pages in asp.net?

I am developing a asp.net web site, having folders student, admin..i both student and admin folder have registration and login page, i want to know how can i access limit of admin folder pages by any user. Basically i want that the admin folder registered ppl should have access to all the pages of student section if they can login using Id, Password...but i don't want any of student to access even the login page of admin section irrespective of even any student know URl for the admin login page, registration page(because i don't want him to register at all) also i want to know ho can i again sub divide the a few limits for the some other admin. Basically i want to set roles that admin can access all web site pages but student even cant access that admin folders pages and again some different kind of admin cant access a few pages from the same admin section page please elaborate me on this how can i achieve this ?
I would recommend looking at the Role Manager that is built into ASP.Net starting with version 2.0. Rather than attempting to explain all the details I am providing the following How To from MSDN that will show you How To: Use Role Manager in ASP.NET 2.0.
Once you start using it you can then come back and post some more specific questions if you have any problems.

Drupal: How to remove login to make site passwordless for users?

I want to remove the login page from a Drupal site so that the site is open and public-facing. Only the admin would need to login. Does anyone know how this can be accomplished?
You can't remove the login page, because the administrators will need one to login.
You could, however, give anonymous users access to whatever you like. So that you don't have to be logged in the use any feature of the site. If users are to create content or do other stuff, you will need for them to login, so that you can tell them apart.
Edit
To configure the access control, you'll have to go to admin/user/permissions, where you can select which permissions anonymous users (and other user roles) should have.
Drupal 7
You do not need to remove the login page to make the site open and public facing. Any browser to your site would be given an anonymous user role by default. So any content that is visible to the anonymous role (which can be altered by going to admin/user/permissions) and published can be seen. As long as your website is not in maintenance mode.
If your looking to move the login block that is on the front page of most new Drupal installations you'll have to go to admin/structure/blocks and change the setting there.
I looked through permissions, but nothing helped me to make the main site page available instead of the login page.
Open Features (site.org/features), change Site settings -> Site work mode from Only private access to Open access (moderated registration) (sorry, the names were translated back from Russian).
This has solved my problem. I made private access to the site before and forgot about that. I wanted to disable new users registration (because of mass spam). This can be done through admin/user/settings -> Only site administrators can create new user accounts. [I use Drupal 6, but Drupal 7 works same with this setting]. [UPDATE: it seems, at least for my somewhat outdated setup, that these two Drupal options contradict each other, when I allow only administrators to add users, the private mode turns on automatically :( ]

Resources