Authorization for tcodes created for table maintenance - abap

Would appreciate if you could answer my questions:
1) If I created a Z transaction code for maintaining a Z table that has authorization group not equals to &NC& and data browser/table view maint is set to Display/Maintenance Allowed with restriction, Does that mean the Z tcode will also be restricted to few users?
2) Is there a way to know who are authorized to run a certain Z Tcode created for maintaining a table?

Ad. 1.) No, it won't.
Ad. 2.) Yes, there is.

To accomplish this in SUIM go like this: User -> Users by Complex Selection Criteria -> By Transaction Authorizations
There enter tcode and press F8.

Related

Metadata filter in Essbase not working

I have a BSO cube and it's Org hierarchy is set like below:
Org:
totalUS
US
US retail
Us non retail
A1
B1
C1
D1
D_001
the user group should only see data for #IDescendants(US non retail) and Idescendants(D1).The user wants totalus hidden too.
My Maxl script is:
grant read on database 'Test'.'Test' to group 'Test';
create or replace filter 'Test'.'Test'.'MetaTest'
meta_read on '#IDESCENDANTS ("US non retail"),#IDESCENDANTS("D1")' ;
grant filter 'Test'.'Test'.'MetaTest' to group 'Test';
Still my Smart view pull shows data and member name for totalus,totalus is sibling of A1,B1,C1,D1.
Please help me!
You need to change your filter to disallow access to the #IDESCENDANTS("TotalUS") and then have the metaread. Just because the metaread focuses on a different hierarchy doesn't mean that you've addressed the other elements in the hierarchy, which is what you need to do. The Essbase admin guide talks about some of the fundamentals of filters, including this.

Teamspeak hierarchy permission configuration

I'm trying to configure my teamspeak server and I don't know how to do some things, so I'm asking help to configure it... here is what i wanted to do:
I have some categories like 'Minecraft' or 'Planetside 2' or 'Devlopment' and each categorie contain some channel and sub channel. which lead to something like that:
Then about users :
First, there's me: the admin.
Then I want to be able to put some people in a 'Moderator' group
Me and moderators can define some people as 'Categorie leader'. for example, I can put people A to be a 'Minecraft Category leader'
A Categorie leader can define who is in his categorie (of course moderator and admin can also), for instance: My Minecraft categorie leader A can put people B to be a Minecraft Player. But a Minecraft Categorie leader can't put People C as a 'Planetside 2 player'.
This configuration is show on this picture:
Then about the channel !
I will take the example of the Planetside 2 Categorie :
I will have 2 channels in the categorie : the first one will allow only Planetside 2 player, Planetside 2 leader and admin to access it. the second one will allow everybody to access.
How can I do that ?
For the moment I didn't try anything, as I don't want to do some mistake that would make it hard ton configure. But I was thinking about channel group, and allow a channel group to access a particular channel. I found some topics on google which make me think it's not that hard.
But then, i don't find anything which can help me to do the part where I want my Categorie leader putting channel groupe only for his categorie.
Any idea ?
Thanks for your help.
For your first question, unfortunately, this is not possible.
TeamSpeak permission is based on a numeric system, instead of a tree hierarchy system.
In other words, if my value is greater than yours, I have power over you.
So back to your case, the most you can do is a four-level rank, with Admin -> Moderator -> Leader -> Members.
In other words, if your leader made their own member groups, all other leaders can access it (since they got higher power than the member group), which is not something you'd want, but that's the sad reality of it.
Now, to your second question on channel groups, this is doable, just follow the instructions:
set all channel's needed_join_power with a value greater than 0, also make sure that you set the needed_join_power of the channel you want to exclusively for leaders is higher than that value.
set admin and moderator's join_power higher or equals to the value you set for step 1.
set the SERVER GROUP of the default Member group's join power to 0
set up channel groups with Leader and Member, both with join_power higher than the value in step 1, also make sure Leader's join power is higher than Member's
Grant Leader with the power to move user
Done. Once this is complete, the leader can move users into their channel and grant the user with the associated channel groups. When the user is assigned with the associated channel group, they can freely move in and out of the channel at free will.

SQL Server: Avoid simultaneous updates increasing a column value over its target

I have a SQL Server table called AD where ad's to be viewed are stored as
create table Sponsors.AD
(
ADID varchar(40) primary key,
SponsorID varchar(30),
PurchasedViews int , --How many views the ad must reach before it is disabled
CurrentViewCount int, --Keeps track of how many views the ad has gotten
{...}
Active bit -- for easier checking of whether the AD still has clicks to give
)
This feeds into a webpage where, to access a feature, users first need to view an ad. Users can pick one ad from a menu that displays three options [they pick one, the ad's media is displayed and the feature is unlocked at the conclusion].
After they view the ad, its CurrentViewCount should be updated (increased by 1).
This is handled by a stored procedure that includes an update call for the table - separate from the stored procedure that fetches 3 ads at random for the option menu - but I'm looking for suggestions on how to solve the problem of synchronizing all concurrent AD views - as it could happen that
two or more users have the same ad in their 3-choice-menu
two or more users view the same ad at the same time
1 and 2 are not a problem on their own but they could be if the ad is one click away from it's set maximum.
One way I've thought to solve this is to set the active flag as false if the ad is one click away from it's target when it is displayed in the 3-option menu, and if the user does not click it, the flag will be reset to true -- but then I'd need to handle cases where the user exits the option dialogue or disconnects, times out, etc. I feel like there must be a better way.
Another suggestion I've heard is to automatically increase the counter when the ads are summoned to the 3-option menu but that's even more overhead than the other and suffers the same issues.
Locking the table is absolutely infeasible unless we wanted to only serve one ad view at a time - so I'm not even considering it.
I'm sure something like this has been discussed before but don't know what keywords/etc to search to find more on this.
I would not count the clicks within the same table... Could avoid your locking issues...
But, to get to your question: maybe you could handle this "fuzzy". Not the thight active=yes/no but rather something like an InactivityLevel together with a timeout.
As long as your flag would be true, everything is fine. If the counter exceeds, you switch to "No new visitors" and set a timestamp, so your add won't display in a new context. You set this to "inactive" after a given timeout.

MySQL joins for friend feed

I'm currently logging all actions of users and want to display their actions for the people following them to see - kind of like Facebook does it for friends.
I'm logging all these actions in a table with the following structure:
id - PK
userid - id of the user whose action gets logged
actiondate - when the action happened
actiontypeid - id of the type of action (actiontypes stored in a different table - i.e. following other users, writing on people's profiles, creating new content, commenting on existing content, etc.)
objectid - id of the object they just created (i.e. comment id)
onobjectid - id of the object they did the action to (i.e. id of the content that they commented on)
Now the problem is there are several types of actions that get logged (actiontypeid).
What would be the best way of retrieving the data to display to the user?
The easiest way out would be gabbing the people the user follows dataset and then just go from there and grab all other info from the other tables (i.e. the names of the users the people you're following just started following, names of the user profiles they wrote on, etc.). This however would create a a huge amount of small queries and trips to the database in a while loop. Not a good idea.
I could use joins to retrieve everything in one massive data set, but how would I know where to grab the data from in just one query? - there's different types of actions that require me to look into several different tables to retrieve data, based on the actiontypeid...
i.e. To get User X is now following User Y I'd have to get my data (User Y's username) from the followers table, whereas User X commented on content Y would need me to look in the content table to get the content's title and URL.
Any tips are welcome, thanks!
Consider creating several views for different actiontypeids. Union them to have one full history.

Elegant Web Permission Schemes

I'm currently writing a web application that have about 6-12 pages. On each one of these pages, I want the user to be able to do some (or all) of the following actions: View, Add, Update, and Delete.
The current permission scheme I thought of is having an integer in a database. This integer will correspond to a binary number (e.g.: 26 -> 11010). The resulting binary number acts as a "toggle" and determines what permissions the user has. The definition of what bit represents what permission is stored in another table.
My problem is, if each page has 4 options (view, Add, Edit, Delete), then this way of determining permissions can get out of hand.
Does anyone have any other ideas for a permission scheme that would be as flexible (with respect to configurability) as this, but not as overwhelming (with respect to integer limits)?
Perhaps a better answer, if you really need to go this route, is to have a per-page/per-user row in your database, with a set of permissions, so your table looks like so:
page user create read update delete
===== ===== ====== ==== ====== ======
test.html joe y y y n
test2.html joe n y y n
Alternately, as is usually the case, you're better off having roles, like author, editor, reviewer, admin, and giving your roles the fined-grained permissions, and putting the users into roles.
I would suggest you do not resort to bits. Use separate columns in the DB for each category of permissions and use integers 1 and 0 to indicate whether that permission is granted or not. This would save you from bit manipulations and would be fast as well. The only downside will be a larger number of columns which, by your description, does not seem much of an issue.