- Add a field `allowed_groups` to shortcuts, which will contain groups which can
access a particular app
- When a user is logged in, only return those shortcuts to the front page if the
user is allowed to access them. This check is done based on the allowed_groups
field of the shortcut
- Add allowed_groups for shortcuts of all apps with group-restricted access
Signed-off-by: Hemanth Kumar Veeranki <hemanthveeranki@gmail.com>
Reviewed-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
- Fix incorrect use of compound boolean expression in if statement.
'a and b or c' is treated as '((a and b) or c)'.
- Allow unhiding a shortcut.
- Raise exception when shortcut requested does not exist. This is the
Python way.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
In a module, when URL is not avialable for a shortcut, send None instead
of an implementation specific detail on how to show description. This
allows use to change the implementation of how description is shown
without changes to modules.
- After the shortcuts were turned into a list instead of dictionary, the
descriptions stopped showing in the front page due to an 'in' check
that worked for dict. Fix this by changing the shortcuts into a
dictionary.
- Also make the key of the shortcut dict an 'id' instead of 'app' that
could create confusion how an app maps to a shortcut.
- Minor indentation fixes.