Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6121667
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:48:37+00:00 2026-05-23T15:48:37+00:00

I have an application that is coded using Flex 3 on UI side and

  • 0

I have an application that is coded using Flex 3 on UI side and java @ the service layer, along with BlazeDS. Now we need to authorize the users accessing the system based on the roles that are defined for them in the database, eg : say a user with role guest should not be able to access Admin tab on ui and also should not be able to do any operations other than viewing the data displayed on dashboard.Also the point to note here is that roles can be created dynamically by Super users from UI.

I came across this link which describes how to perform Role Based Authentication & Authorization

With this approach i need to define the roles in service-config.xml but since my roles are not pre-defined i cannot go with this.

Has anybody encountered a similar situation. Any pointers will be of great help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:48:37+00:00Added an answer on May 23, 2026 at 3:48 pm

    Yes, I don’t like the service-config idea either, don’t blame you.

    As far as the flex side, all you need to worry about is defining permissions, not roles or users of course.

    Good form roles based security involves defining users, roles and permissions. You probably know this, but good to say it out loud anyway with the question.

    • Users are assigned one or more roles
    • Roles are assigned one or more permissions
    • Permissions secure functionality

    So, in your application, you define specific permissions – pieces of the app that are dependent on security – visible / invisible / can or cant execute, etc. The way I normally do this is with a string constant. So, in an order management situation, I might have CanCreateOrder, CanViewOrder, CanCancelOrder, CanFlagOrder.

    On the server side, a role will be tied to those permissions. Lets say:

    • Admin can do all
    • CustomerService can do view, and flag
    • Customer can do view

    So on your server side, user A who is an admin, gets a list of all the permissions tied to the roles they are assigned, so the server sends back a string like this CanCreateOrder,CanViewOrder,CanCancelOrder,CanFlagOrder

    Inside your application, when the user is authenticated and gets that list, its stored into a static global variable somewhere (or you .split() it into an array etc).

    Then, when checking visibility or access to individual items, you simply check that array or string of values.

    This offers a lot of flexibility as the items you are defining, most importantly, the permissions you’re basically hard coding – are specific to the functional code they exist in. Therefore, there isn’t a need to adjust them.

    So, if you want to make customer service reps the ability to cancel orders later, you simply tie that permission to that role. Done. No code needs to be changed because the permission it simply tied to that functionality, not users, not roles.

    I’ve done this in numerous applications, its a solid design. If you need permissions tied off other keys, that’s a mildly different story, but this is a good starting point regardless.

    Make sense?

    **Naturally you may encrypt the security exchange and send over SSL, securing that transaction is out of scope of the discussion 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that was coded with JSPs and now we are in
I have an mvc application that has been coded to use Windows authentication and
I have a console application that require to use some code that need administrator
I have a web application that will need to access code behind methods as
I have a flex application that loads an external swf file. I created the
I have a flex 3 application that creates an Image from a canvas which
Im working with a flex application that pulls data from a java class file
I'm using Eclipse to write a small Java application that uses WLST to manage
I am new to flex framework. I have created an application using flex framework
I am using Flex Builder 3 to develop my first application that will communicate

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.