Suppose I have two content typs, "Job Listing" and "Job Application". A job application has a field (using the CCK module) to reference the job listing (a required field). Suppose the job application has a field "Status" with values like "new", "accepted", "rejected".
I would like to set permissions so that the job application status can only be set by the creator of the job listing it corresponds to. If there is an addon that can do this great. I would also like general direction as to how a custom addon might implement this.
(I am following the scenario in Ch. 3 of O'Reilly's "Using Drupal")
I don't know if there is a module for this but this can be done pretty easily with some custom code though.
Use hook_form_alter to add your own validate handler to the node_edit form for the application content type.
Check to see if the value has changed
Set an error is user isn't the creator or has the administer content permission.
You're done.
Directions by googletorp are on the right track but you will have to take care of some more permissions also.
Remove the edit own permission for the application content type.
Also you probably do not want author of one job listing editing the applications in response to some other job listing. This is hard to do with any built in permissions. So check in the form_alter hook that current user is the same as the author of the job listing to which the application being edited is connected to.
Related
I wanted to give sulu a try and so far it looks nice. So installed a minimal version via composer, defined some page templates and everything worked so far. Then i added a new localization as described in http://docs.sulu.io/en/latest/book/webspaces.html and http://docs.sulu.io/en/latest/book/localization.html. Which is not working.
As described i simply added <localization language="de" default="false"/> to the list. But i cannot access the content of the new locale and moreover the starting page content.
The error i retrieve is a permission error:
Operation forbidden The available permissions are not sufficient for this operation
I've checked the permissions and every available permission is granted to the user. Now i am stuck.
That's because you don't have these permissions in the correct locale. The User Role only describes what the user is allowed to do, but it doesn't describe in which language. That's because we don't want to have uncontrolled of user roles. Imagine you have a big homepage, with english, german and french content, then you would have to create three roles: Content Manager EN, Content Manager DE and Content Manager FR. We have chosen a different way.
In a user role you don't describe in which language these permissions apply, you do that on the user instead. Go to Contacts, select the contact with your user, and choose the permissions tab.
In the permissions section on this page you see a table with all the roles, the one being assigned are checked. The dropdown on the right describes to which language this applies. You probably haven't assigned the language to your new user here.
Want to make alfresco site read only in alfresco community 5.0 so that no one can make any changes or edit that during migration.
I already tried changing the user/group permissions but that method doesn't work properly. Is there any other way to make the sites read only?
You need to make all sites in read only mode and so entire Repository should be in read-only mode for migration!
Try this property in your alfresco-global.prop file
server.allowWrite=false
Please check this for reference
The best way to make a site read only would probably be to modify all members of that site to have the consumer role (this would prevent them for creating new content or editing any existing content).
Unfortunately there is no bulk capability built into the UI to do this, however it should be a relatively straightforward exercise to create an admin only custom WebScript to achieve this. It would necessary for the Admin to become the site manager of each site before attempting to change the role of each site member, but there is an API for doing this.
Alternatively (if you have only a few sites) then you could do this manually through the UI using the Site Management Admin Console page. Again, the Admin would need to become the Site Manager for each Site and then visit the site and change the role of every member.
As suggested by #DaveDraper in a former answer, you could setup site memberships to the consumer role. However, this won't take into account any special permission given on a particular node (folder/document) in that site either with or without inheritance of permission.
So, if you intend to block any writes on the entire alfresco repo/site you could simply setup an extra security interceptor on your NodeService to block any write access using the NodeService.
PS : You could get some inspiration from the "NodeService_security" bean and implementation !
I can think of a turn-around or two, but those would be really sloppy so I won't be including them in this response
I'm using umbraco CMS and creating a site like blog. Including me there are 10 members involved in
writing article's but i'm the one who needs to check the article.
All 10 members are not in a single place. The thing I want to know is if a person other than me is putting a content, I only want to decide whether to publish or not. Is there a option to set this kind of permission.
would somebody say can we done this in umbraco CMS.
Yes, this can be done.
Within the Users section, there's a node called User Types and from your description it sounds like Writer is best suited for your members. Just make sure they are set as this user type when creating/updating their respective user nodes. Most notably, they'll have the following permissions amongst others:
Create
Update
Send to Publish
There's a bunch of other permissions there that you can choose from if Writer doesn't precisely match your requirements or you could create your own user type from scratch.
I need to implement a workflow in my Drupal website. I have a simple workflow:
contributer: Who create nodes in draft status saves new versions of a node
publisher: Do the same as the contributer and change the state of the draft node to published status.
I'm confused between Maestro, Workbench and Workflow modules.
Does anyone know which one is the most appropriate in my case?
Thank you very much.
Regards.
For this approach no need any Contributor module.Login as admin give the create permission to the normal user(may be fall under some roles) expect "administer nodes".If we disable this permission to the particular role who will not get a option to publish the content.
I usually use Workflow module http://drupal.org/project/workflow.
1) What you need is to create workflow.
2) Create workflow states
3) Give required state change roles to the roles
4) Go to the Permissions, remove all permissions from the Node, for you will give them in the workflow settings page
I have one portal with 3 modules inside it, now my requirement is i would like to create
new portal for every client registered in my DNN site.
So, i have one interface for registration, so as soon as client registers entirely new parent portal should be created with all the modules.
How can i achieve this functionality ???
I would suggest digging into the admin files that come as part of the default DNN installation and look for the code that creates a new portal from there. It will ultimately be calling a stored procedure to create the necessary data in the SQL tables. You might get away with just calling the stored procs but the admin code probably calls several different ones to setup the default security settings.
Curiously what alias will each of these portals use? It's not clear why you need a complete portal for each user. The DNN segmentation already allows you to show different content based on role membership. Why the need for a whole portal per user?
Use the site wizard to create template of the current portal and during client registration programmatically execute the template. You may also want to automate the site setup in IIS.
Well, You can easily do it! Login to host and go to portals. Click on create new protal.
See which control is responsible for creating new portal. you can simaply get it by using firebug and look into client id of link or text box.
Once you do that, you will find the code you can use.
tell me if you need more help with it, I'm good with what you want to do!