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 7666757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T14:54:57+00:00 2026-05-31T14:54:57+00:00

In a multi tenant web application should Symfony2 ACL framework be used for checking

  • 0

In a multi tenant web application should Symfony2 ACL framework be used for checking the ownership of domain objects?

I can’t get the point since (assuming each table has a back reference to the User object) i can simply check current user id against the entity owner id, like the following:

/*
 * @Route("/edit/{slug}")
 * @Method("GET|POST")
 * @Secure(roles="ROLE_USER")
 * @Template
 */
public function editAction($slug);
{
    // Find the post given the slug
    $repo    = $this->getDoctrine()->getRepository('AcmeHelloBundle:Post');
    $entity  = $repo->findOneBySlug($slug);
    $current = $this->get('security.contex')->getToken()->getUser();

    // 404 if slug is invalid
    if(!$entity) throw new $this->createNotFoundException();

    // AccessDenied if current user is not the owner of the entity
    if($current->getId() != $entity->getUser()->getId())
        throw new AccessDeniedException();
}

Maybe ACL can help avoiding back referencing each entity to the user table? Any explanation or example would be helpful, thanks.

  • 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-31T14:54:59+00:00Added an answer on May 31, 2026 at 2:54 pm

    ACL is useful when you have a scenario that multiple people have access to same domain. The ACL documentation has a good example for that.

    For example, lets say you have SaaS providing collaborative document editing for companies. A company may want to restrict access to a document, to only allow the executives of the company to edit it and not the employees. In that scenario, you can’t use the User token alone, since multiple members needs to access to the domain. This is where the usefulness of ACL comes in.

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

Sidebar

Related Questions

I'm looking at using Subsonic with a multi-tenant ASP.net web application. There are multiple
I'm building a multi-tenant web application where for security concerns, we need to have
We're in the process of doing some performance optimization for a multi-tenant Web application.
I'm working on multi-tenant application in Zend Framework which gets it's tenantID from the
Our company has a multi tenant asp.net web application. The application is 3 tier
When you run the same web based application as a multi-tenant application for different
I'm creating a multi tenant application like shopify and wanna know how can I
I can create a secure, multi-tenant web app with Grails by : setup spring
Back Story I am currently updating an existing web application to support a multi-tenant
I'm building a multi-tenant ASP .NET application. Given that each tenant can configure their

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.