Cleaner ACL aros_acos table? - cakephp

Everything seems to work as expected, but I can't seem to find in the core method that removes aros_acos records.
The problem I am having is if I use $this->Acl->allow() it creates a record.
However $this->Acl->deny() doesn't delete the record. It merely marks it as denied (Which is fine, if you are looking to explicitly deny Aco's.)
Because my default action is to deny all unless there is an allow record in the aros_acos, I don't need those records, and on a larger project, this table is going to fill up quickly. Is there a method to remove those records? Or is this something I am going to have to do "manually"?
Thanks

If you want to mange the roles in wide level then use the CakePHP Acl Manage plugin for manage roles for users or group.

Related

WP: How to delete unused taxonomies and terms from the DB?

while working on my basic website and creating a custom plugin to add different taxonomies and custom post types, I ended up with several entries in the database that are not useful anymore.
I'm wondering if there's a nice way of deleting them.
Using plugins to clean up the database doesn't work, because these search for orphaned contents. But these taxonomies do exist along with their terms, and I guess there is no reason to consider them orphaned.
They were created with "register_taxonomy" and afterwards added the terms manually.
Thanks a lot!

Need advice with multiple people working on an Access Database

This may seem like an ignorant issue, but I am inexperienced with Access. This is for a school project. I am in a group of 5 people who are all working on a database. We were wondering: what is the most efficient way for multiple people to work on a database without sending the database file to and fro or just putting a copy on a file sharing service? Is there a way we can all log in and modify the same database?
There is a way to do this. If you put the database file in a shared location where everyone can access it. You need to change the database locking options so that multiple users can make changes to it.
In Access 2013 go to File->Client Settings->Advanced and change the Open Mode to shared, also change Record locking to Edited Records - this will enable uses to make changes but not to the same record.
If you want users to make changes to the same record select No Locks but it is not a good idea as if two users change at the same time the last one will be saved.
As for file sharing service, well, this expert and this one too say it doesn't work.

liferay id generator accross the database

I have been given a task to migrate users from customers database to liferay portal.
I have already managed to find all the places I need to fill with data, to make a user functional (USER_, USERS_GROUPS, CONTACT_, LAYOUTSET, EXPANDOVALUE).
The only problem I have faced are the IDs. Liferay doesn't use a sequence to generate them (at least I haven't found one), but appears to generate them from the code. What's even more concerning, It looks like all the IDs (UserID, GroupId, RowID, etc) need to be unique not only in scope of a table, but whole database.
I need to find a way to get the last used ID in database and a way to set last ID used by my script, so that Liferay doesn't use it again.
I don't have access to an application server, just the database, that's why I can't use the API...
First of all I would like to ask, why do you have no access to the application server? Changing things in the database is like repairing a modern car without tools and manual. It is possible to get all things right - but it is possible as well to screw all things up, if you forget anything that the API is usually thinking off.
That having said:
The counter ID is saved in the COUNTER table in the row with name com.liferay.counter.model.Counter. It is incremented by the value of the property counter.increment (usually 100). Check the class CounterFinderImpl to see how Liferay is using it.
Ensure that the server is stopped before modifying anything in the database - as Liferay is caching many things, especially the current counter value.

crm 2011 Changing owners of 30K records

We currently have a single business unit and 90% records are owned by a single Scribe user. Now we have added a new business unit and out of 400K contacts, 30K contacts will be moving under this new business unit.
I have created a new user in CRM who belong to this new business unit. Next step is to change the owner of these 30K contacts to newly created user.
Correct me if I am wrong, but this is the only way I can move these 30K contacts in to the new business unit?
Problem I am having is changing owner field of these 30K contacts in one go. I can use advance find and then change owner that way but imagine doing 30K this way?! I can also export excel sheet with all records, change owner and import it back in but that gives error (may be because I am changing a very important security related record?)
One last option for me is to make this change directly in to the CRM database but that is not my favorite choice.
Any suggestion will be very appreciated.
You can also write a console application using the CRM 2011 SDK
http://www.microsoft.com/en-us/download/details.aspx?id=24004
this application will execute a RetrieveMultiple
http://msdn.microsoft.com/en-us/library/gg328149.aspx
and because are more than 5K need to do paging as explained here:
http://msdn.microsoft.com/en-us/library/gg327917.aspx
for each retrieved record you need to set the new owner using an AssignRequest message
http://msdn.microsoft.com/en-us/library/microsoft.crm.sdk.messages.assignrequest.aspx
The MSCRMToolkit on Codeplex has a Workflow Execution Manager utility which allows you to run an On Demand workflow on a FetchXML recordset. Haven't tried it myself yet but have been keeping it in my back pocket, just in case.
I know this is an old question but the easiest way I find to change the Owner on a large amount of records is to (carefully) edit the database directly. If you know what you're doing with SQL then it's a piece of cake, otherwise I would steer clear.
To Update the Owner of a Lead:
USE <DEPLOYMENT>_MSCRM
GO
UPDATE LeadBase
SET OwnerID = <guid of owner here which can be found in the OwnerBase Table>
It is similar for other entities, OpportunitiesBase for Opportunities etc.
***** WARNING, this will update every record in the LeadBase Table *****

Delete redundant MOSS content database entry

In a sharepoint content database we have noticed there are a couple of records in the all_docs table that reference documents that no longer exist. The listid guid that they are associated with is not in the site so we have no way to view them and delete them. I think this was a result of moving a content database from another environment into this one.
Can anyone suggest the best approach to clean this up? I need to delete it as it is referencing a page layout that I cannot delete until this page has been removed.
Have a look at Fear and loathing, it describes an undocumented stsadm command to delete an object by its id.

Resources