RBS Overview


Author
Message
Jon Neale
Jon Neale
StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)StrataFrame Beginner (41 reputation)
Group: Forum Members
Posts: 11, Visits: 93
Hi,

Pleasestick with me as I have only been looking over the RBS for 24 hours. I have gotto the point where I am stuck in a room on my own and need to try andregurgitate what I think I understand so far, otherwise I am in danger ofconfusing myself even more!

BeforeI start looking at the Framework as a whole I want to evaluate the RBS to seeif it will allow me to do what I need, or perhaps I should say see if I canunderstand it well enough to do what I need. I've had a look at some of the forum entries and help and found the document by CBlanke which taught me more in 10 minutes than I'd learnt in the 10 hours!

I'veassumed I'm using a Stratframe project with security.

Firstly- In the RBS Editor you set up projects in the main StrataFrame database andagainst these projects you create all the Permissions/Keys that you believenecessary for your project. For example against a form you can create apermission to access the form but also to edit, delete and add if so wanted.

Second- Through VS properties you assign the security keys against different objects,Forms, BO's etc.

Froma developer perspective that's what I HAVE to do before deployment.

Third- Add a hook into the Security Editor for the run time application so that theend user can create Roles and Users and assign the pre-defined permissions toRoles.

Andthat's about it.

Coupleof definite questions I have:

  1. Currentlywhen I run my application in debug, through VS, I am looking at a differentdatabase, Stratframe Test, which doesn’t include my permissions. My understandingis that if I create a fresh database I can export my RBS Project to thatdatabase using the DDT. Is that correct?
  2. Onething on the security I have is that in the application I need to build I needto implement data level access rights. So for instance, take a Payroll appwhere some users are blocked from seeing specific employees, say Directors orsomething. I think I might be able to do this with the Permissions but I thinkI may need to create lots of them. How would it be best to approach this?
Manythanks for listening to my ramblings and I welcome any feedback even if it's go back and startagain.

Jon


Reply
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Jon,

I understand what you are looking for.  You basically want to have a Row security which I don't believe is supported directly by the RBS. 

One quick way to get this done could be as follow:
  1. For the table where you want to manage Row Security add an Integer field to define the Payroll Manager/Payroll Assistant access value, ex: Manager=1, Assistant=2
  2. Create a permission for each in RBS and assign it to the users you want.
  3. In your BO create custom field methods for your form using a Stored Procedured and included a Parameter to filter the Payroll Access value created in step 1.  To see if the current user is a Payroll Manager or Assistant, call the SecurityBasics.CurrentUser.GetPermission("Payroll Manager").Action and then pass the paramter to your stored procedure to filter the data accordingly.
The code below is just a sample method you can have in your Business Object to get the data based on the Payroll Permission, of course you need to work out the WHERE condition

    Public Sub FillAllByPayrollAccess()
         Dim payrollAccess As Integer = 0
         '-- Retrieve the permission and test it
         If MicroFour.StrataFrame.Security.SecurityBasics.CurrentUser.GetPermission("Payroll Manager").Action = PermissionAction.Grant Then
             payrollAccess = 1
         End If
         Using cmd As New SqlCommand
             cmd.CommandText = "Select * from Users where PayrollAccess = @PayrollAccess"
             cmd.Parameters.AddWithValue("@PayrollAccess", payrollAccess).SqlDbType = SqlDbType.Int
             Me.FillDataTable(cmd)
         End Using
     End Sub


Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search