Page 1 of 1

RemoveClientFromGroup - All ?

Posted: Tue May 29, 2012 12:17 am
by yyi
Hi All, Is there a way to do this cleanly in one go rather than
inspecting each group per client with any changes :?:

Since there is always more removal than assigning to do, so
to assign after 1st removing all..


Thanks

Re: RemoveClientFromGroup - All ?

Posted: Tue May 29, 2012 11:03 am
by lotsaram
If you are using RemoveClientFromGroup then you are already in TI, ... and then surely if there is a need to remove the client from ALL groups then it is just a matter of an extra 4 or 5 total lines of code to do a while loop through the }Groups dimension? (maybe an extra line or 2 to accommodate testing and error handling). Development time effort measured in minutes not hours.

As for processing time to action, even for a mammoth }Groups dimension this is going to be something that TI handles in hundredths of a second.

Re: RemoveClientFromGroup - All ?

Posted: Tue May 29, 2012 1:34 pm
by yyi
Just realised a quick method;

Code: Select all

ViewZeroOut('}ClientGroups', 'All_Groups');
This should work fine in prolog I'm thinking..

Re: RemoveClientFromGroup - All ?

Posted: Tue May 29, 2012 1:56 pm
by jim wood
This shouldn't work as it will try to remove the admin clients as well. When I tried this the server crashed and I had to rebuild the security control cubes. The way I did was to create a client excluding the admin users and use that as data source for element deletion,

Jim.

Re: RemoveClientFromGroup - All ?

Posted: Tue May 29, 2012 2:34 pm
by tomok
jim wood wrote:This shouldn't work as it will try to remove the admin clients as well. When I tried this the server crashed and I had to rebuild the security control cubes. The way I did was to create a client excluding the admin users and use that as data source for element deletion,
Jim.
Jim, he's not deleting clients or groups, just removing clients from groups. Since this is nothing more than string data in a cube, I don't know why it wouldn't work. It's worth a quick test.

Re: RemoveClientFromGroup - All ?

Posted: Tue May 29, 2012 2:46 pm
by jim wood
Ah good call. It's the day after the night before........

Re: RemoveClientFromGroup - All ?

Posted: Tue May 29, 2012 4:37 pm
by qml
Still, attempting to remove Admin user from Admin group might cause issues, but I've never tested it myself.

Re: RemoveClientFromGroup - All ?

Posted: Tue May 29, 2012 5:15 pm
by tomok
qml wrote:Still, attempting to remove Admin user from Admin group might cause issues, but I've never tested it myself.
I've tried it before and you can't, it's hard-coded into TM1 somehow. Imagine the nightmare if you could so easily remove it. :!:

Re: RemoveClientFromGroup - All ?

Posted: Tue May 29, 2012 9:46 pm
by qml
I know you can't actually do it, that's why I said "attempt", but as history teaches there is a non-zero chance of a similar (i.e. not foreseen by the development team) attempt ending in a server crash.