The CreatorCon Call for Content is officially open! Get started here.

Business Service cmdb_ci_service, limit/hide some classes

siais
Giga Contributor

Business Service cmdb_ci_service, is there a way to limit the number of classes this table show? We want to temporarily hide Application service and Technical Service records in this table and only show Business service class records in this table.

1 ACCEPTED SOLUTION

@siais  I would concur with @Sajilal and use Before Query Business Rule over an ACL to go with the less complex solution.

A BR will only apply to the table it is built where as ACL are evaluated for any rule on the table being accessed as well as any ACL on any of the parentage of the table so the ACL on Service will still apply the same restrictions to tables extended from it.

But using either solution you will need to set conditions based on the record's attributes. Unfortunately I'm a process guy, not a developer so I can't help you with that code. While I have not tried to accomplish exactly what you are doing, I'm confident it is possible.

You will need to experiment with something like a Where Class is ... or Where Class is not ... condition.

If you share a screenshot of what you have tried so far I'm sure the community can help you troubleshoot further.

View solution in original post

7 REPLIES 7

Aaron W_ Smith
Mega Guru

@siais As a Business Analyst I would actually challenge the value/need for this requirement, but accepting there is a good reason, your options range from all the platform capabilities to exclude by "where class is not ____" for each you don't want to see (in approximate order of effort/maintenance cost):

  • Train users on how to apply filters on table and save as personal Filter or Favorite
  • Share a Favorite with filter applied with target users by URL or inserting as User Preference
  • Add in the filter into the Module (using from URL type) used to access the table list view
  • Add/update ref qualifiers with filter to any Reference fields looking at the Services table
  • Add a before Query Business Rule to filter the records for some/all users
  • Add/update the existing ACL on the table to restrict read access to the target records

 

You can look up details on how to do all of these in the Docs site. Hope this helps!

Hi Aaron, the ACL solution is the one which would meet our requirement to limit the view of those records, no matter where it is being queried/referenced.

When we tried the ACL on cmdb_ci_service table, the other classes (Technical Service, Application Service and Service offering) disappeared from the read, which is what we wanted.

But it also affected the child table read. For example, we cannot read records from cmdb_ci_service_technical table, which is the base table for Technical Service class.

 

Is there a way to limit the read on records in parent table, but same records can be read from child table?

 

Aaron has already answered that "

  • Add a before Query Business Rule to filter the records for some/all users"

Hope this helps!

Thanks,

Saji

@siais  I would concur with @Sajilal and use Before Query Business Rule over an ACL to go with the less complex solution.

A BR will only apply to the table it is built where as ACL are evaluated for any rule on the table being accessed as well as any ACL on any of the parentage of the table so the ACL on Service will still apply the same restrictions to tables extended from it.

But using either solution you will need to set conditions based on the record's attributes. Unfortunately I'm a process guy, not a developer so I can't help you with that code. While I have not tried to accomplish exactly what you are doing, I'm confident it is possible.

You will need to experiment with something like a Where Class is ... or Where Class is not ... condition.

If you share a screenshot of what you have tried so far I'm sure the community can help you troubleshoot further.