Liran Tal's Enginx Driving an innovative future

Attachment links fixes for in-browser download 0

Attachment links fixes for in-browser download

If to quote the attachment links project on Drupal: “The Attachment Links module provides permanent links to files attached to a node. A single, easy-to-remember URL can be used to retrieve the preferred (canonical) or newest version of a file regardless of how many versions of that file have been attached to a node”. Incase the light-bulb didn’t turn on yet for you – with Drupal, if you upload a file...

Implementing user-specific, role-based access control per node type, per group. (Part 4) 0

Implementing user-specific, role-based access control per node type, per group. (Part 4)

This entry is part 4 of 4 in the series Implementing Organic Groups RBAC per Node Type

Implementing role-based node access control in groups. Overview As mentioned earlier, Drupal is pretty permissive by default and don’t offer a ‘view page’ kind of permission for page content type. Moreover, it’s attempt to call other modules to control access to the content type is limited only to the module that created this node so this is not really helpful. Now consider an example use case – each member of...

Implementing user-specific, role-based access control per node type, per group. (Part 3) 0

Implementing user-specific, role-based access control per node type, per group. (Part 3)

This entry is part 3 of 4 in the series Implementing Organic Groups RBAC per Node Type

Practical node access system with Organic Groups OG approached the node access system in a way which only requires the user to be a member of a community in order to see all of it’s nodes, whatever types they are. Therefore, og_access module defines an og_subscriber realm and sets the grant id to always be the group id. So for example, in the node_access table we have a record for...

Implementing user-specific, role-based access control per node type, per group. (Part 2) 1

Implementing user-specific, role-based access control per node type, per group. (Part 2)

This entry is part 2 of 4 in the series Implementing Organic Groups RBAC per Node Type

More in-depth node access system overview So what is that node access system? The involved components are a few hooks that modules define if they want to hook into the way the node access system work; Furthermore, there’s the node_access table in the database which maintains all of the grants for each node in the system. The node_access table This table is joined against queries and it’s holding all of...

Implementing user-specific, role-based access control per node type, per group. (Part 1) 0

Implementing user-specific, role-based access control per node type, per group. (Part 1)

This entry is part 1 of 4 in the series Implementing Organic Groups RBAC per Node Type

We’re going to review a fringe case of setting an access control system, such that, the view access to a node is dependant upon the role the user have. To further complicate it, users get different roles in different groups they are in. Basic node access system overview To understand first how Drupal’s node access system behaves by default, let’s follow this process flow that presents what happens when a node is being...

Restricting Drupal’s upload module to N attachments 0

Restricting Drupal’s upload module to N attachments

If you’ve enabled the node attachments support in Drupal 6 and needed to limit it’s use for only allowing to attach one file per node and didn’t know how then this post is for you. You can also achieve the same thing with the CCK’s FileField module by attaching it and setting the field to appear once instead of ‘Unlimited’ though there may be cases where you just don’t want...

Maintaining states between form submit and node hooks in Drupal 6 0

Maintaining states between form submit and node hooks in Drupal 6

With Drupal, it is many times the case where you’d find yourself working with custom forms or alter existing forms through the Form API and end up modifying the submit handler so that you are essentially triggering node_save() yourself. If you find yourself in such scenario where you are also having conditional actions in an implementation of hook_nodeapi() then you’ll soon enough realize that there is complete isolation between the...

daloRADIUS VM update 0

daloRADIUS VM update

A minimal daloRADIUS VM update for those of you who are still using the original VM you got from the previous daloradius.com blog website – the following commands are necessary to allow the web server user to save settings to daloradius.conf.php as well as add the web server user to the adm group so that it’s able to view log files by freeradius and such. chown www-data:www-data /var/www/daloradius/library/daloradius.conf.php usermod -a -G...

Alter WYSIWYG settings in Drupal 0

Alter WYSIWYG settings in Drupal

If you deliver content notifications over email and that content may have images attached to it, inline in the message, it will badly display an image source that it can’t find. This is because when the WYSIWYG adds the image to the page it sets the image source to be a relative URL such as /system/files/image_1.jpg It’s possible to create an alter hook that changes the init settings passed to the...

Drupal Commons menu items adjustments 0

Drupal Commons menu items adjustments

With commons you mostly feel like you’re always eating a mixed salad. You get a lot of Acuiqa’s custom features and contributed modules, which all of it builds up a specific distribution type. Salads lose their appeal when you need to dig in and seek for a specific item, which was the case in a recent fiddling with it. Commons provids a ‘bookmarks’ link in the user’s Profile area underneath the user’s...