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

  • Home
  • SEARCH
  • 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 585945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:03:21+00:00 2026-05-13T15:03:21+00:00

I am working on a web application where different user groups have different access

  • 0

I am working on a web application where different user groups have different access to
resources. So far nothing special I guess, but there is a caveat;
the application is divided into “domains” so that each of our client organizations
has their own content. Here I am using a simpler model to illustrate my problem.

Each domain has
the same resource types, but each resource instance is connected to one domain only.
Here is what it would look like with one domain:

Resources: stories, announcements

Roles:
    guest   // read only access
    root    // unlimited access 
    editor  // like guest, but with r/w access to resource "stories"
    admin   // r/w access to both resources

I have come up with two different approaches to implement this using Zend_Acl,
the first is to simply use different ACLs for different domains, copying the above
for each domain. The second is to use one ACL only and add new roles for each domain:

Domains: domain0, domain1, domain2

Roles:
    guest
    root
    editor-domain0
    editor-domain1
    editor-domain2
    admin-domain0
    admin-domain1
    admin-domain2

The second approach has the advantage that a user can be admin of one domain while
being editor of another (might actually happen). But it also has the disadvantage
that the roles are not static – we need to generate each time we add or remove a domain.

Are any of these approaches any good, or are there better ways of dealing with multiple domains?

  • 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-13T15:03:21+00:00Added an answer on May 13, 2026 at 3:03 pm

    Another solution could be to subclass Zend_Acl, more specifically the methods ‘allow’ and ‘deny’.

    Eg

    allow($role, $action, $resource, $domain) {
     // parent::allow($role . '-' . $domain, $action, $resource);
    }
    

    It’s not as simple as that but you get the idea.

    I’m not sure about what you mean with resource instances, but I’ll suggest it anyway: ‘resource-domain’, eg allow(‘admin’, ‘action’, ‘story-domain0’).

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

Sidebar

Ask A Question

Stats

  • Questions 320k
  • Answers 320k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Put the $(LIBFLAGS) after lgainscalecalc. The linker command line is… May 14, 2026 at 12:24 am
  • Editorial Team
    Editorial Team added an answer It comes from the greek roots "poly" (many) and "morphe"… May 14, 2026 at 12:24 am
  • Editorial Team
    Editorial Team added an answer jQuery plugins are generally designed to return a jQuery object… May 14, 2026 at 12:24 am

Related Questions

I am currently designing a Membership/Profile scheme for a new project I am working
I have a situation where my website needs to quickly retrieve data from my
What's the proper way to deal with a web page that returns results of
I am working on a web project as a Web Site, rather than a
I'm having an issue with CruiseControl.net where the web dashboard just won't work in

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.