Git Product home page Git Product logo

luya-privacy's Introduction

LUYA Logo

LUYA privacy extension

LUYA Tests Latest Stable Version Total Downloads Maintainability Test Coverage Slack Support

The LUYA privacy extension has helpers for privacy management, as needed by certain privacy laws.

  • Widget to agree privacy statement.
  • Asset File to load resources only when cookies are accepted.
  • Trait to attach into your own controllers, blocks etc. in order to trigger whether privacy statements has been accepted or not.

Installation

Install the extension through composer:

composer require luyadev/luya-privacy:^1.0

Usage

Please take a look at the description in the files for usage and API details:

luya-privacy's People

Contributors

boehsermoe avatar dependabot[bot] avatar hbugdoll avatar johnnymcweed avatar mhunesi avatar nadar avatar vavepl avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

luya-privacy's Issues

Helpers for identity's data

I think on the long term this extension has to include some helper functionality for an identity's privacy.

What I mean is, that there should be "a default way to handle an identity's privacy".
So there should helpers be inlcuded, something like:

  • getDataByIdentity($identity)
  • deleteDataByIdentity($identity)

Then new modules could easily implement these methods and e. g. a user component can go through all modules, collect everything together and display it to the user. Moreover it make's the delete task very easy.

Privacy cookie block

The privacy cookie can currently be checked and set through the widget. This makes sense in terms of a global setter, e. g. when it is included in the layout to check in every request.
If output is not enforced, the widget will disappear once the user has made a decision.

With the block it would then be possible to include that widget e.g. on the privacy policies page or somewhere else, to give the user the chance to change the choice easily.

cookie expire time

What steps will reproduce the problem?

Cookie expiration time should be longer then current session. change to a year. (As we all hate those dialogs anyhow!)

Privacy cookie widget

A widget to provide the privacy text.

luya\privacy\CookieHint::widget();

The cookie should work out of the box, with inline css for absolut position etc. even a message file with default texts should be available but with option to override.

options:

  • message
  • element (an array to full configure the html element)
  • css: turn off or override defaults

Full config could look like:

luya\privacy\CookieHint::widget([
    'message' => 'text ...'
    'element' => ['tag' => 'p', 'class' => 'alert alert-info'
]);

"Cookie killer"

When widget output is forced, it outputs the privacy message even if a choice has been made. This is needed in terms of giving the user an easy way to change his settings.

The problem at the moment is that if a user has accepted and then declines afterwards, nothing happens to already set cookies. Therefore we need to take care about these, so we should have something like a "cookie killer", which deletes all cookies once the user declines.

Redirect back after setting the cookie

What steps will reproduce the problem?

Using the widget as it is.

What is the expected result?

The get param should be removed after setting the cookie

What do you get instead? (A Screenshot can help us a lot!)

Some seo tools give warnings due to the acceptCookies param

Something like this solves the problem...

if ($acceptCookies == '1') {
      $this->setPrivacyCookieValue(true);
      Yii::$app->response->redirect(Yii::$app->request->referrer);
}

Cookie container class

Currently we're adding the styles e.g. through $css param and/or project css.

It would maybe make sense, if the widget's CSS class is adjustable aswell.
Like this we could then use e.g. Bootstrap's fixed bottom class or whatever and it would directly be styled in our default colors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.