Hierarchical expiration policies on individual items - sharepoint

I am looking to implement a custom policy for item expiration on a custom list (not a document library).
This policy must be editable on an item-per-item basis, and compute the expiration date based on user-defined rules such as: number of accesses, expiration timespan, or any aggregation of the two rules above. Because of this granularity, I cannot use the default expiration policies model (or implement a custom one), nor the default audit in my expiration policy.
As the items are organized in folders and subfolders, I would like to apply the policies hierarchically (similar to the OOTB permission model).
My solution would be to create custom content types for the folders and the items in order to include a column which will hold the serialized rules, while the access to this "rules" field would be synchronized manually from code. A custom Infopath form would be used to edit the attached rules for each entry in the list (be it Folder or Item), and this data would be used by a custom application page to grant access to the item or not (based on additional item fields, it also does the actual job for each item).
While I am not exactly sure the above solution would be approved (company policy might forbid me to edit toe Global.asax file for the synchronization scheme), I am wondering if anyone may come with a better architecture for this requirement?

Ok, I will give it a shot. First, I would forget about InfoPath and go for a custom ASPX page for configuring policies. The whole project should be packaged in a WSP solution with the following ingredients:
Policy configuration aspx page in the _layouts folder. This page should enable users to create and edit policies for lists, folders and items. The page could in turn serialize and store rules in the property bag on list items. For list level rules, use the SPWeb property bag. Alternatively, create a hidden list where all rules are stored in XML files associated with a list, folder or item.
Site Collection Feature that adds Custom Actions to your custom list for adding and editing policies. You could add a custom action like "Edit Policy" to the ECB menu on folders and items. For list level policies, you add a similar action to the list actions menu.
SharePoint Timer Job for enforcing the policies. Use a farm level feature to install the timer job in a feature receiver on activation.
No matter what, I think you will face a fair amount of development effort.

Related

Show menu items when authenticated in Orchard

On the main menu I have 5 items for an Orchard site. Some of those menu items I only want to be visible after a user has logged in.
Any suggestions on how to do that?
The easiest way is to have two menus, one on the non authenticated layer and one on the authenticated layer, and have the authenticated items only on the menu being displayed on the authenticated layer. It introduces some replication but yeah, easy.
You could enable Content Item Permissions and make your MenuItem Content Types Securable in their Content Definition. That way you can select exactly which roles are able to see each link.
Enable the Content Item Permissions feature
Check Securable and Securable Content Items in the Content Defintion of the Content Type you want to secure
Attach the Content Permissions Part to the Content Type you want to secure
Now you can set global permissions for the Content Type in the Content Permissions Part settings or override them on individual Content Items by checking or unchecking the appropriate boxes for every Role.

Nintex workflow to change user group?

I am currently trying to set up a nintex workflow in SP 2010 that will run when an item is created in a list. Basically, users will be set in a custom permissions group before they create an item. When an item is created, the workflow will check for who created the item and then set that person in a different custom permissions group. From what I have found, the only way to do this is by using a call web service action, this requires credentials that I do not have access to. I was curious if there was a way to achieve the same permissions switch workflow without using the call web service action?
You could always use the action "change item permission" which should do the trick for modifying permissions to the item. you can assign it to either a person or group.
I would also suggest looking at a different route for managing item permissions. Change them at the item level is doable but can quickly become a nightmare if you want to revert things or figure out who has what after the 1000th item has been modified.

Add new fields to create_account.jsp without custom fields functionality in Liferay

I want to add 15 new fields to my user account creation page in Liferay. How it is possible other than custom fields, expando tables? Because I know how to use custom fields. I have more fields so it will be difficult to manage. Through hook I want to add more fields to account creation page.
Fields are related to user.
Create one selectbox that will have list of organizations available in my application.
Create one selectbox that will have list of roles available in my application.
onclicking of save button that should redirect to 3rd party payment gateway. Once paid amount it will create account for that user.
After paid amount all the above fields need to add under extra table with related columns and maps to the user_ table with userId as a primary key.
assign that organization to the user which is selected above and similar for role also.
I am using Liferay 6.2. Please let me know if any one have any ideas!
Learn Java. A modification of the platform to the extent that you're mentioning won't work without knowing Java. You'll introduce all kinds of issues in your system.
Then there are two options:
Just implement a custom portlet that takes all the values that you want, saves them where you want and queues them in your payment system. Disable Liferay's "do-it-yourself-signup" and place your own links to the "create account" portlet. This will be easiest to maintain
Alternatively, override Liferay's JSP that's used for the "create account" UI as well as the action that's handling the data. The default implementation would save everything in Liferay's database - including custom fields. As you implement it yourself, you can do whatever you want with this data.

how to make dynamic change in worlflow definition

I am using liferay 6.1.1CE.
Am using kaleo as my workflow engine.
As of my knowledge,the workflow is uploaded as a xml file . and i did that(upload a workflow with 2 levels of approvel).
my question is, can we dynamically change the roles,user ids in that workflow through a user interface that is provided to a particular user in my portal?
2ng thing is
for eg: i have a portlet that is common to all users,In my portal 2 user groups are there.
Different approval criteria for both groups.
so i can create two type of workflow for the two groups.
my question is,based on the user ( in which group) can i redirect the portlet to the corresponding workflow...?
share your suggestions..Is it possible or not?

Program custom permission level

Can i program custom base permission level? There are many available in SPBasePermissions like
UseRemoteAPIs Use SOAP, WebDAV, or Microsoft Office SharePoint Designer 2007 interfaces to access the Web site.
ViewFormPages View forms, views, and application pages, and enumerate lists.
ViewListItems View items in lists, documents in document libraries, and view Web discussion comments.
However i want to make a custom one, something like:
EditItemsAssignedToMe + ViewItemsAssignedToMe + view/edit items i created.
Still finding my way out to allow users view and edit items created by them or assigned to them.
OOTB you don't have the fine-grained control and can only assign a certain set of permissions as defined on technet and this blog article.
However programmatically you can create a new SPRoleDefinition and assign it the appropriate permissions based on the SPBasePermissions enumeration as per this blog article. You might also want to read this short guide on the basics of SPBasePermissions.
If you want to go even further though and emulate the OOTB behaviour with your own custom permission set try Implementing Custom Security Rights in SharePoint.

Resources