what the value in User parameter name used in the path?

Created on 20 October 2023, about 1 year ago

how to use this module?

i try to input username value in field "User parameter name used in the path", also i try to put uid but access denied.

For the name of the module, i think its used to grand access a view display to specific user who legged in, its?

💬 Support request
Status

Active

Version

1.0

Component

Documentation

Created by

🇮🇩Indonesia tinohuda

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @tinohuda
  • 🇧🇪Belgium jyraya

    Hello,

    The module is designed for working with the "Views" module.

    When you create a page "View" with this module enabled, you can restrict the access to this view to the user referred in the path (URL) you set in the "Path"" option in the page settings" block of the "View" configuration.

    The path option value must contain a dynamic parameter defining this user reference. Usually, the parameter inserted in the path is "%user" as for the edit form of the user profile (I.E.: "user/%user/edit").
    However, it happens people wants to use another parameter format as "%uid", %employee" or even "%".

    The "User parameter name used in the path" field allows you telling to the system where it can find the parameter referencing the user in the path.

    If I reuse the above examples, the value to insert in this field would be:

    • For "%uid" (e.g. "page/%uid/personal_content"), the value to set is "uid".
    • For "%employee" (e.g. "page/%employee/personal_content"), the value to set is "employee".
    • For "%", it is special case as the usual 2nd part of the parameter "name" is absent. In that case, you must play with such value "arg_0".
      • If you have a simple View path as "page/%/personal_content", the value is then "arg_0".
      • If you have a complex View path as "page/%/blabla/%" where the second "%" represent the user-related parameter, the value is then "arg_1".

    The module does not work for restricting a page "View" on a specific user, by defining a View path like "user/jyraya/personal_content".... at least yet. :-)

    Does this feedback help you?

    Regards.

Production build 0.71.5 2024