Permission "Add tag"

modules_

Joined: 2005-01-12
Posts: 60
Posted: Sun, 2009-11-08 12:05

is it possible to setup permission for 'Add tag'. As i got it right there is only an add permission, so user can add pictures and albums too.

I am using gallery3 and gallery3-contrib from git.

Thks modules_

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 11015
Posted: Sun, 2009-11-08 13:56

No, the tag module does not add any permissions. Anyone who can edit can add tags. They don't need to be able to add items, just edit them.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
modules_

Joined: 2005-01-12
Posts: 60
Posted: Mon, 2009-11-09 19:51

Right, its edit permission. Anyway its possible for anonymous to edit/add other information than tags.
Is there a module where i can have a look on how to implement add permission for tags plugin?

Thnks, modules_

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 11015
Posted: Tue, 2009-11-10 21:00

No, I haven't seen anyone extend permissions with modules yet. But I'd start by taking a look at /modules/gallery/controllers/permissions.php (contains logic for the basic view/edit permissions) and /modules/gallery/controllers/albums.php (contains logic for add permissions)
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
modules_

Joined: 2005-01-12
Posts: 60
Posted: Wed, 2009-11-11 21:49

had a short look into both files and tried to insert INSERT INTO permissions VALUES (5,'Add Tags','addTags');
After this the permission form stopped after the title and it was not possible to add new albums.
so DELETE FROM ...

Some more tips?

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 11015
Posted: Wed, 2009-11-11 21:55
Quote:
Some more tips?

It's going to take more than just a DB edit to make it happen. You'll need to create new functions that extend the existing functionality. That's all I can give you, I'm not a programmer.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments