Add a new group

ehfortin

Joined: 2009-04-19
Posts: 3
Posted: Sun, 2009-04-19 13:49

Hi,

First, I must say that I like the G3 look and feel. It is a simple gallery to use and it look clean. The idea of having a strong core application with the ability to add plugins to it (that can be created and managed by anybody interested in doing so) is the way to go IMHO.

Now, my current problem.

I've done a checkout of the latest code this morning (April 19th) and got some updated file like user.php but this didn't fixed the issue I'm experiencing.

I've created a small gallery and wanted to restrict the access to it. As I don't want everybody in the "Registered Users" to have access, I tried to create a new group. When I click on "Add a new group", I'm getting the popup, I add a new name and click on "Add Group" but... nothing is happening.

I've checked in the apache log and there is no error and there is actually a "post" to "admin/users/add_group" but that's it. Nothing seems to happen after that. If I do a select in the groups table, only the two basic groups are there.

Is that a known issue?

Thank you.

ehfortin

 
Okat
Okat's picture

Joined: 2009-04-05
Posts: 78
Posted: Mon, 2009-04-20 12:43

Have the same problem. Haven't been able to fix it yet.

 
Okat
Okat's picture

Joined: 2009-04-05
Posts: 78
Posted: Thu, 2009-04-23 19:17

In "modules/user/controllers" add "$form = group::get_add_form_admin();"

public function add_group() {
access::verify_csrf();
$form = group::get_add_form_admin();
$valid = $form->validate();
if ($valid) {
$new_name = $form->add_group->inputs["name"]->value;
$group = ORM::factory("group")->where("name", $new_name)->find();
if ($group->loaded) {
$form->add_group->inputs["name"]->add_error("in_use", 1);
$valid = false;
}
}

Seems to work for me. Was able to delete the group (which is another function) and add a user to it.

I changed this on the latest version of that particular file (20554 as far as I know) available from SVN.

Haven't got much experience with SVN and I don't think I can upload the file to the repository, but maybe someone will notice this post who can (and is willing to) change it. It's probably not very high on the 'to do' list and they're probably busy fixing the so called 'blockers'. Which is a good thing.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-04-24 00:35

Yikes! Filed ticket #230 for that and fixed it in r20622. Thanks, Okat!

 
ehfortin

Joined: 2009-04-19
Posts: 3
Posted: Fri, 2009-04-24 02:37

I've not edited the file manually but update my svn copy and... it now work perfectly to add a group. Didn't tried to delete one yet. So either your upload did the job or bharat did it.

Thank you very much.

ehfortin