Joomla2.5 how to set access for different group in ACL

99 views
Skip to first unread message

gopijack

unread,
May 16, 2012, 1:14:32 AM5/16/12
to Joomla! General Development, pas...@gmail.com, ma...@betweenbrain.com, davida...@gmail.com, khoui...@gmail.com, tomfu...@gmail.com
Hi,

Normally,ACL will have default access setting for every groups...

For example:

Author group will have only access for Create.

Manager group will not have access for Configure.

Administrator will not have access for edit/edit state.

But for me i need to set default access for certain group when i
installed my component.

For example:

I need to set full Access for Administrator and Manager.

How to set ? any thing i need to edit in access.xml file or any thing
else ?

Thanks in advance.



gopi gopi

unread,
May 16, 2012, 2:54:46 AM5/16/12
to Joomla! General Development, pas...@gmail.com, ma...@betweenbrain.com, davida...@gmail.com, khoui...@gmail.com, tomfu...@gmail.com
Hi ,

 I got solution,

while i am installing the component, I need to update my permission rules in #__assets table.

If we need to give full access to particular group like Manager or Author by default,

In install.yourcomponent.php, we have to write our own query like this  update #__assets table.

In #__assets table there is `rules` field which it will be store all the permission value,so here we need to update the table using our value.

for example:

update #__assets set `rules`='{\"core.manage\":{\"6\":1},\"core.configuration\":{\"6\":1,\"7\":1,\"8\":1},\"core.admin\":[],\"core.create\":[],\"core.delete\":[],\"core.edit\":{\"8\":1},\"core.edit.state\":{\"8\":1}}' where `name`='com_yourcomponent' and title=' yourcomponent '

that's it !..


that's it !..



--
Regards

Gopi.A

Individual source from Adodis Technology,India.

 (Working for www.chillcreations.com)

elin

unread,
May 16, 2012, 3:24:08 PM5/16/12
to joomla-de...@googlegroups.com, pas...@gmail.com, ma...@betweenbrain.com, davida...@gmail.com, khoui...@gmail.com, tomfu...@gmail.com
Making any assumption about what groups exist and what webmasters want them to do is extremely problematic.


Elin

gopi gopi

unread,
May 17, 2012, 12:37:38 AM5/17/12
to joomla-de...@googlegroups.com
Hi,

 By Default,while installing any component,Component Configure permission will set by default to every user group.

Eg : Register group user can't access the back end,but for me i need to set my default access permission.

For that purpose only i just used above query.It will be execute while installing the component.


--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To view this discussion on the web, visit https://groups.google.com/d/msg/joomla-dev-general/-/h2dZY27XLbMJ.
To post to this group, send an email to joomla-de...@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-gene...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

piotr_cz

unread,
May 17, 2012, 3:16:46 AM5/17/12
to Joomla! General Development
Hi, I agree with Elin.
If I'm not wrong, if you install Joomla without sample data, there are
no predefined user groups. Or administrator may remove some of the
default ones.

However there should be some way to help/ guide in mapping component
rights to groups during installation.

I see two solutions:
- During installation you create new user groups and set up rights.
This would be good option if your component has complex ACL and you
don't want component user groups rights to collide with other parts of
Joomla.
- After installation you run a post-configuration where you describe
what rights are good for, pre-select default user groups if available
but leave option to change them by user (or create new ones). This
might be the optimal solution, however requires more coding. Would be
cool if somebody shared it so other devs can take use it.

piotr_cz

gopi gopi

unread,
May 17, 2012, 9:05:00 AM5/17/12
to joomla-de...@googlegroups.com
Hi,

 I have one doubt,if user doesn't install the sample data,then what will happen actually ? It won't set any user group by default ?

Adam Rifat

unread,
May 17, 2012, 11:46:24 AM5/17/12
to joomla-de...@googlegroups.com
I've done a couple of installs recently without adding the sample data and all of the default users groups and group permission are set up correctly.

gopi gopi

unread,
May 18, 2012, 12:42:33 AM5/18/12
to joomla-de...@googlegroups.com
Hi,

 If user doesn't install the sample data,default user group is set correctly means then i can set my default Permission setting to my component while installing,there is no issues.

 Right ?

piotr_cz

unread,
May 18, 2012, 3:15:52 AM5/18/12
to Joomla! General Development
Right, assuming that administrator didn't change user groups settings.
Admin can delete user groups, change hierarchy or permissions so as
elin said, you cannot assume that these are same on 100%
installations.

I'd say most users won't do that, but you really should either at
least show up a notice after installation that extension user rights
has been preset for default Joomla installation or show up some kind
of user groups wizard to help in mapping your components rights to
current user groups.


On May 18, 6:42 am, gopi gopi <gopi...@gmail.com> wrote:
> Hi,
>
>  If* *user doesn't install the sample data,default user group is set
> correctly means then i can set my default Permission setting to my
> component while installing,there is no issues.
>
>  Right ?
>
>
>
>
>
>
>
>
>
> On Thu, May 17, 2012 at 9:16 PM, Adam Rifat <a...@littledonkey.net> wrote:
> >  I've done a couple of installs recently without adding the sample data
> > and all of the default users groups and group permission are set up
> > correctly.
>
> > Hi,
>
> >   I have one doubt,if user doesn't install the sample data,then what will
> > happen actually ? It won't set any user group by default ?
>

gopi gopi

unread,
May 18, 2012, 6:06:39 AM5/18/12
to joomla-de...@googlegroups.com
Yes,i agree....

Once , we set our user group permission setting then we have to map the current user(like default Joomla settings has been implemented for this particular group)

or else 

default Joomla default settings.

elin

unread,
May 22, 2012, 6:27:14 AM5/22/12
to joomla-de...@googlegroups.com
Is the issue that you have some additional actions in you component?

Elin

> >> > > To unsubscribe from this group, send email to

> >> > > For more options, visit this group at
> >> > >http://groups.google.com/group/joomla-dev-general?hl=en-GB.
>
> >> > --
> >> > Regards
>
> >> > Gopi.A
>
> >> > Individual source from Adodis Technology,India.
>
> >> >  (Working forwww.chillcreations.com)
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Joomla! General Development" group.
> >> To post to this group, send an email to

> >> To unsubscribe from this group, send email to

> >> For more options, visit this group at
> >>http://groups.google.com/group/joomla-dev-general?hl=en-GB.
>
> >  --
> > Regards
>
> >  Gopi.A
>
> >  Individual source from Adodis Technology,India.
>
> >   (Working forwww.chillcreations.com)
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Joomla! General Development" group.
> > To post to this group, send an email to

> > To unsubscribe from this group, send email to

> > For more options, visit this group at
> >http://groups.google.com/group/joomla-dev-general?hl=en-GB.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Joomla! General Development" group.
> > To post to this group, send an email to

> > To unsubscribe from this group, send email to

> > For more options, visit this group at
> >http://groups.google.com/group/joomla-dev-general?hl=en-GB.
>
> --
> Regards
>
> Gopi.A
>
> Individual source from Adodis Technology,India.
>
>  (Working forwww.chillcreations.com)

--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To post to this group, send an email to joomla-dev-general@googlegroups.com.
To unsubscribe from this group, send email to joomla-dev-general+unsub...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/joomla-dev-general?hl=en-GB.

Reply all
Reply to author
Forward
0 new messages